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>
    <style>

        .box{
            width: 970px;
            height: 3000px;
            border: 1px solid red;
            margin: auto;/*margin:auto 将box1自动居中*/
            
        }

        .box1{
            width: 200px;
            height: 260px;
            border: 0px solid red;
            box-shadow: 2px 2px 2px 2px  #999;/*制作阴影部分*/
            float: left;/* float: left 使标签向左聚集(浮动)*/
            margin: 20px 20px 20px 20px;/*根据 上 右 下 左 的顺序*/
            
        }

        .box2{
            width: 200px;
            height: 200px;
            border: 0px solid red;
        }

        .box1:hover .box3{ /*鼠标移动到box1区域时显示透明部分*/
            display: block;
             
        }

        .box5{
            border: 0px solid rgb(11, 11, 11);
            position: relative;/* 相对定位*/ 
        }

        .box3{
            width: 200px;
            height: 40px;
            border: 0px solid red;
            position: absolute;/* 绝对定位*/
            left: 0;
            bottom: 0;    
            background-color: rgba(0, 0, 0, 0.5);/* 透明色*/
            color: #dad7d7;
            line-height: 40px;
            display: none;/* 将透明框隐藏*/
            }

        .clear_float{
            clear: both;/* 清除浮动*/
        }
        
       
        
    </style><!-- &nbsp相当于一个空格 -->
</head>
<body>
    <div class="box">
        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

        <div class="box1">
            <div class="box5">
                <img class="box2" src="https://p3.music.126.net/DrRIg6CrgDfVLEph9SNh7w==/18696095720518497.jpg">
                <div class="box3">&nbsp;&nbsp;&nbsp;播放量30000+</div> 
            </div>
            <p class="box4">1234567</p>
        </div>

       

        


     
    </div>
    
    
</body>
</html>

运行结果:

相关推荐
_未知_开摆12 分钟前
CSS | 实现三列布局(两边边定宽 中间自适应,自适应成比)
前端·css·vue.js·vue·html·css3·html5
飞行codes20 分钟前
FLASK创建下载
前端·python·flask
XRJ040618xrj36 分钟前
web前端第八次作业---制作音乐榜单
前端
匹马夕阳1 小时前
基于TypeScript封装 `axios` 请求工具详解
前端·javascript·typescript
小魁的C世界1 小时前
uniapp小程序开发,配置开启小程序右上角三点的分享功能
前端·小程序·uni-app
小彭努力中2 小时前
64.在Vue3中使用OpenLayers显示带箭头的线段,箭头居中
前端·javascript·vue.js·arcgis·openlayers
我是哈哈hh2 小时前
【javascript】Web APIs-Dom获取&属性操作
开发语言·前端·javascript·css·html
02苏_2 小时前
2025/1/12 复习JS
开发语言·前端·javascript
HsuYang2 小时前
Vite源码学习(七)——DEV流程中的Middleware
前端·javascript·架构
小丑西瓜6663 小时前
Vue如何构建项目
前端·javascript·vue.js·前端框架