自制网页效果之家乡【开封】
2023-12-30 10:21:10
插入了两个视频 用到了html+css 及视频 此处可以看到详细页面http://mcy1223.web3v.work/15%E8%92%8B%E5%A4%A9%E4%B9%90%E5%AE%B6%E4%B9%A1/
以此来作为我的期末作业 顺带介绍一下我的家乡----开封
开封,古称东京、汴京,简称“汴”,有“十朝古都”、“七朝都会”之称。是中原经济区的核心城市之一,也是中国历史文化名城之一。
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>魅力开封</title>
<link href="css/style15.css" rel="stylesheet" type="text/css">
</head>
<body>
<!--head begin-->
<div id="head">
<div class="con">
<ul class="left">
<li>首页</li>
<li>美景</li>
<li>美食</li>
<li>特色</li>
<li>百科</li>
</ul>
<ul class="right">
<li>点击浏览</li>
<li>播放记录</li>
<li>登录|注册</li>
</ul>
</div>
</div>
<!--head end-->
<!--nav begin-->
<div id="nav">
<div class="nav_in">
<ul>
<li><a href="#"></a></li>
<li><a href="#">个人中心</a></li>
<li><a href="#">视频播放</a></li>
</ul>
<ol>
<li></li>
<li></li>
<li>󰄪</li>
<li></li>
</ol>
</div>
</div>
<!--nav begin-->
<!--banner begin-->
<div class="banner">
<div class="banner_pic">
<div class="current"><img class="ban" src="img/清明上河园.jpg"></div>
</div>
<p>开封,古称东京、汴京,简称“汴”,有“十朝古都”、“七朝都会”之称。是中原经济区的核心城市之一,也是中国历史文化名城之一。</p>
<p class="ty2">观看最新视频</p>
<ol id="button">
<li class="current"></li>
<li class="but"></li>
<li class="but"></li>
</ol>
<a href="#con" class="sanjiao"><img src="img/jiantou.png" alt=""></a>
</div>
<!--banner end-->
<!--content begin-->
<div class="hot">
<h2>最热视频</h2>
<video src="css/开封.mp4" controls autoplay loop></video>
<a href="#"><img src="img/墙.jpg" ></a>
<a href="#"><img src="img/开封.jpg" ></a>
<video src="css/开封府.mp4" controls autoplay="autoplay" loop></video>
<a href="#"><img src="img/鼓楼夜市.jpg" ></a>
<a href="#"><img src="img/铁塔.jpg" ></a>
</div>
<div class="share">
<h2>开封景色</h2>
<a href="#">
<img src="img/相国寺.jpg" >
<div class="cur">
<img src="img/小熊.png" >
<h3>大相国寺</h3>
<p>寺庙</p>
<span>查看</span>
</div>
</a>
<a href="#">
<img src="img/龙亭.jpg" >
<div class="cur">
<img src="img/小狗.png" >
<h3>龙亭</h3>
<p>公园 殿堂</p>
<span>查看</span>
</div>
</a>
<!-- <a href="#">
<img src="img/铁塔.jpg" >
<div class="cur">
<img src="img/小熊.png" >
<h3>开封府</h3>
<p>曾是北宋时期的首都</p>
<span>查看</span>
</div> -->
</a>
<!-- <a href="#">
<img src="img/古城墙.jpg" >
<div class="cur">
<img src="img/小狗.png" >
<h3>古城墙</h3>
<p>古城墙</p>
<span>查看</span>
</div>
</a> -->
</div>
<!--content end-->
<!--footer begin-->
<div id="footer">
<div class="foot">
<a href="#head"><span>Top</span></a>
<p>这就是我的的家乡开封</p>
</div>
</div>
<!--footer end-->
</body>
</html>
css
@charset "utf-8";
/*重置浏览器的默认样式*/
body, ul, li, ol, dl, dd, dt, p, h1, h2, h3, h4, h5, h6, form, img ,video{margin:0;padding:0;border:0;list-style: none; outline:none;}
/*全局控制样式*/
body{font-family:"微软雅黑",Arial, Helvetica, sans-serif; font-size:14px; background:#282828;}
a{color:#333;text-decoration: none;}
@font-face{
font-family:'freshskin';
src:url('../fonts/iconfont.ttf');
}
/*head begin*/
#head{
width:100%;
height:46px;
background:#000;
}
#head .con{
width:1200px;
margin:0 auto;
}
#head .con .left{float:left;}
#head .con .right{float:right;}
#head .con .left li{
float:left;
height:46px;
line-height:46px;
margin-right:50px;
color:#fff;
cursor:pointer;
}
#head .con .right li{
float: right;
height:46px;
line-height: 46px;
margin-left:50px;
color: #fff;
cursor: pointer;
}
#head .con .right li a{color:#fff;}
/*head end*/
/*nav begin*/
#nav{
width:100%;
height:55px;
position:absolute;
background:rgba(255,255,255,0.8);
z-index:10;
}
#nav .nav_in{
width:1200px;
margin:0 auto;
}
#nav ul{float: left;}
#nav ul li{
float: left;
margin-right: 50px;
font-size: 18px;
height:55px;
line-height: 55px;
}
#nav ul li:first-child a{
display:inline-block;
height:55px;
width:118px;
background:url(../img/logo.jpg) no-repeat center left;
}
#nav .nav_in ol{
float: right;
width:300px;
height: 55px;
font-family:"freshskin";
}
#nav .nav_in ol li{
float: left;
width:32px;
height:32px;
line-height: 32px;
text-align: center;
color:#333;
box-shadow: 0 0 0 1px #333 inset;
transition:box-shadow 0.5s ease 0s;
border-radius: 16px;
margin:10px 0 0 30px;
cursor: pointer;
}
#nav .nav_in ol li:hover{
box-shadow: 0 0 0 16px #fff inset;
color:#333;
}
/*nav end*/
/*banner begin*/
.banner{
width:100%;
height:720px;
position: relative;
color:#fff;
overflow: hidden;
text-align: center;
}
.banner .ban{
position: absolute;
top:0;
left:50%;
transform:translate(-50%,0);
}
.banner .current{display: block;}
#button{
position:absolute;
left:50%;
top:90%;
margin-left:-62px;
z-index:9999;
}
#button .but{
float:left;
width:28px;
height:1px;
border:1px solid #d6d6d6;
margin-right:20px;
}
#button li{cursor:pointer;}
#button .current{
background:#F90;
float:left;
width:28px;
height:1px;
border:1px solid #F90;
margin-right:20px;
}
body:hover .banner h3{
padding-top:200px;
opacity: 1;
}
.banner p{
width:715px;
position: absolute;
top:50%;
left:50%;
font-size: 20px;
opacity: 0;
transform:translate(-50%,-50%);
transition:all 0.8s ease-in 0s;
}
body:hover .banner p{opacity: 1;}
.banner .ty2{
position: absolute;
top:1000px;
left:50%;
font-size: 20px;
opacity: 0;
transform:translate(-50%,0);
transition:all 0.8s ease-in 0s;
}
body:hover .banner .ty2{
position: absolute;
top:400px;
opacity: 1;
}
.sanjiao{
width:40px;
height: 30px;
padding-top: 10px;
border-radius: 20px;
box-shadow: 0 0 0 1px #fff inset;
text-align: center;
position: absolute;
top:1000px;
left:50%;
z-index: 99999;
opacity: 0;
transform:translate(-50%,0);
transition:all 0.8s ease-in 0s;
}
body:hover .sanjiao{
position: absolute;
top:500px;
opacity:1;
}
.sanjiao:hover{box-shadow:0 0 0 20px #2fade7 inset;}
/*banner end*/
/*content begin*/
.hot{
width:1200px;
height:825px;
margin:0px auto;
border-bottom: 3px solid #ccc;
}
.hot h2,.share h2{
text-align: center;
color:#eee;
font-size: 36px;
font-weight: normal;
line-height: 100px;
}
.hot video{
float: left;
width:792px;
height:448px;
margin:0 0 12px 17px;
overflow: hidden;
background:#000;
}
.hot a{
float: left;
width:388px;
height:218px;
overflow: hidden;
margin:0 0 12px 17px;
}
.hot video,.hot a:nth-of-type(3),.share a:nth-of-type(1),.share a:nth-of-type(3){margin-left:0;}
.hot a img,.share a img{display: block;}
.hot a img{transition:all 0.5s ease-in 0s;}
.hot a:hover img{transform: scale(1.1,1.1);}
.hot video{
width:795px;
height:448px;
overflow: hidden;
}
.share{
width:1200px;
height:850px;
margin:0 auto;
border-bottom: 3px solid #ccc;
}
.share a{
float: left;
position: relative;
width:592px;
height:343px;
margin:0 0 16px 16px;
overflow: hidden;
}
.share a .cur{
width:296px;
height:345px;
background: rgba(255,255,255,0);
position: absolute;
left:-296px;
top:0;
text-align: center;
transition:all 0.5s ease-in 0s;
}
.share a:hover .cur{
position: absolute;
left:0;
top:0;
background: rgba(255,255,255,0.5);
}
.share a:nth-of-type(2) .cur,.share a:nth-of-type(3) .cur{
position: absolute;
left:592px;
top:0;
}
.share a:nth-of-type(2):hover .cur,.share a:nth-of-type(3):hover .cur{
position: absolute;
left:296px;
top:0;
}
.share a .cur img{
padding:70px 0 15px 125px;
}
/* .share a .cur p{padding:10px 0 15px 0;} */
.share a .cur span{
display: block;
width:75px;
height:30px;
background: #2fade7;
border-radius: 5px;
margin:30px 0 0 110px;
color:#fff;
line-height: 30px;
}
/*content end*/
/*foot begin*/
#footer{
width:100%;
height:127px;
margin-top:100px;
background: #000;
color:#fff;
text-align: center;
}
#footer .foot{
width:1200px;
height:127px;
margin:0 auto;
position: relative;
}
#footer span{
width:58px;
height:32px;
line-height:43px;
text-align:center;
color:#fff;
position: absolute;
top:-31px;
left:600px;
background:url(../img/sanjiao.png);
}
#footer p{
line-height: 127px;
}
/*foot end*/
文章来源:https://blog.csdn.net/J_FOVik_L/article/details/135300554
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。 如若内容造成侵权/违法违规/事实不符,请联系我的编程经验分享网邮箱:veading@qq.com进行投诉反馈,一经查实,立即删除!