Web实验二:电子相册

html代码:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="style.css">
</head>

<body>
    <div class="all">
        <div class="Title">
            <h1>星星的电子相册</h1>
        </div>
        <div class="photo_block">
            <img class="img1" src="./images/1.jpg" title="烤鲈鱼">
            <div class="image__overlay1">
                烤鲈鱼
            </div>
            <img src="./images/2.jpg">
            <div class="image__overlay2">
                牛蛙煲
            </div>
            <img src="./images/3.jpg">
            <div class="image__overlay3">
                北门小炒
            </div>
            <img src="./images/4.jpg">
            <div class="image__overlay4">
                蛋黄鸡翅
            </div>
            <img src="./images/5.jpg">
            <div class="image__overlay5">
                肉蟹煲
            </div>
            <img src="./images/6.jpg">
            <div class="image__overlay6">
                烧烤
            </div>
            <img src="./images/7.jpg">
            <div class="image__overlay7">
                kfc的炸鸡
            </div>
            <img src="./images/8.jpg">
            <div class="image__overlay8">
                鸡公煲
            </div>
        </div>


</body>

</html>

css:

* {
    margin: 0;
    box-sizing: border-box;
    transition: all .4s;
}

body {
    background-color: rgb(255, 215, 198);
    background-image: url(images/back.jpg);
    background-size: cover;
}

.all {
    max-width: 100%;
    min-height: 100%;
    padding: 30px 10% 30px 10%;
}

.Title {
    text-align: center;
    font-family: "HPE";
    color: rgb(70, 39, 6);
    padding-top: 40px;
    padding-bottom: 25px;
}

.photo_block {
    display: flex;
    justify-content: center;
    align-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.photo_block img {
    /* border :15px 5px 5px 5px solid white; */
    border-top: 8px solid white;
    border-right: 8px solid white;
    border-left: 8px solid white;
    border-bottom: 20px solid white;
    box-shadow: 4px 4px rgba(87, 87, 87, 0.349);
    margin: 25px 2%;
    width: 250px;
    border-radius: .2em;
    box-shadow: 10px 10px 10px rgba(0, 0, 0, .5);
    -moz-box-shadow: 10px 10px 10px rgba(0, 0, 0, .5);
    -webkit-box-shadow: 10px 10px 10px rgba(0, 0, 0, .5);
}


.photo_block img:hover {
    transform: scale(1.3);
    transition: all .2s;
    transform: all 0.2s ease-in-out;
    transition: all 2s ease 0s;
    -webkit-transition: all 0.2s ease-in-out;
    -moz-transition: all 0.2s ease-in-out;
    -o-transition: all 0.2s ease-in-out;
    /* filter: blur(2px);
    -moz-filter: blur(2px);
    -ms-filter: blur(2px);
    -webkit-filter: blur(2px); */
}

.image__overlay1 {
    position: absolute;
    top: 172px;
    left: 275px;
    width: 236px;
    height: 174px;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-size: x-large;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay1:hover {
    opacity: 1;
}

.img1:hover .word {
    transition: 0.3s ease-in-out;
    opacity: 1;
}


img:hover {
    cursor: pointer;
}

.big {
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
    width: 100%;
    height: 100%;
    display: none;
}



.image__overlay2 {
    position: absolute;
    top: 172px;
    left: 580px;
    width: 236px;
    height: 174px;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-size: x-large;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}


.image__overlay2:hover {
    opacity: 1;
}


.image__overlay3 {
    position: absolute;
    top: 172px;
    left: 885px;
    width: 236px;
    height: 174px;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay3:hover {
    opacity: 1;
}

.image__overlay4 {
    position: absolute;
    top: 172px;
    left: 1187px;
    width: 236px;
    height: 174px;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-size: x-large;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay4:hover {
    opacity: 1;
}

.image__overlay5 {
    position: absolute;
    top: 425px;
    left: 275px;
    width: 236px;
    height: 174px;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-size: x-large;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay5:hover {
    opacity: 1;
}

.image__overlay6 {
    position: absolute;
    top: 425px;
    left: 580px;
    width: 236px;
    height: 174px;
    font-size: x-large;
    background: rgba(255, 184, 97, 0.28);
    font-size: x-large;
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay6:hover {
    opacity: 1;
}


.image__overlay7 {
    position: absolute;
    top: 425px;
    left: 885px;
    width: 236px;
    height: 174px;
    font-size: x-large;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay7:hover {
    opacity: 1;
}

.image__overlay8 {
    position: absolute;
    top: 425px;
    left: 1188px;
    width: 236px;
    height: 174px;
    font-size: x-large;
    background: rgba(255, 184, 97, 0.28);
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.25s;
    opacity: 0;
}

.image__overlay8:hover {
    opacity: 1;
}


.num1 ul {
    /* 设置相片信息的样式 */
    margin: -5px 0 0 0px;
    padding: 0 0 0 0.5em;
    background: #dceeff;
    border: 2px solid #a7d5ff;
    font-size: 12px;
    list-style: none;
    font-family: Arial, Helvetica, sans-serif;
    display: none;
}

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值