H5图片满屏效果

HTML

<!DOCTYPE>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>学习计划课程介绍H5</title>
</head>
<body>
        <!--学习计划课程介绍H5-->
        <div class="first_box">
            <img src="../img/study_introduction/[email protected]" alt="" class="first_img">
        </div> 
        <div class="secend_box">
        </div>
    <!--引入jquery文件-->
    <script src="../js/jquery-1.12.3.min.js"></script>
</body>
</html>

CSS

/*整体做rem适配,100px相当于1rem*/
html{font-size:13.33333333vw}
/*全局css样式配置*/
*{
    padding: 0;
    margin: 0;
}
/* 学习计划课程介绍H5 */
.first_box{
    width: 100%;
    position: relative;
    height: 100%;
    overflow: hidden;
}
.first_img{
    position: absolute; 
    top: 0; 
    width: 100%;
    height:100%;
}
.secend_box{
    width: 100%;
    height:10rem;
    background-color:red;
}

猜你喜欢

转载自blog.csdn.net/baidu_41601299/article/details/89398034