鼠标可触碰立体方块html
<div class="subtitle">
<a href="#school_other"><span>生活碎片</span></a>
<a href="#self_introduce"><span>简介</span></a>
<a href="#school_lifes"><span>学校生活</span></a>
<!-- 锚点链接 -->
</div>
css
.subtitle{
display: flex;
justify-content: center;
position: absolute;
left: 39%;
top: 5%;
margin: auto;
}
.subtitle:after,
.subtitle:before {
margin-top: 0.5em;
display: flex;
border: 1.5em solid #fff;
}
.subtitle:after {
border-right-color: transparent;
}
.subtitle:before {
border-left-color: transparent;
}
.subtitle a:link,
.subtitle a:visited {
color: #000;
text-decoration: none;
height: 3.5em;
overflow: hidden;
}
.subtitle span {
background: #fff;
display: inline-block;
line-height: 3em;
padding: 0 1.5em;
margin-top: 0.5em;
position: relative;
-webkit-transition: background-color 0.2s, margin-top 0.2s;
-moz-transition: background-color 0.2s, margin-top 0.2s;
-ms-transition: background-color 0.2s, margin-top 0.2s;
-o-transition: background-color 0.2s, margin-top 0.2s;
transition: background-color 0.2s, margin-top 0.2s;
}
.subtitle a:hover span {
background: #FFD204;
margin-top: 0;
}
.subtitle span:before {
position: absolute;
top: 3em;
left: 0;
border-right: 0.5em solid #9B8651;
border-bottom: 0.5em solid #fff;
}
.subtitle span:after {
content: "";
position: absolute;
top: 3em;
right: 0;
border-left: 0.5em solid #9B8651;
border-bottom: 0.5em solid #fff;
}
鼠标触碰图片放大
.school_life{
position: absolute;
top: 0;
width: 300px;
height: 300px;
margin: 50px auto;
overflow: hidden;
}
.school_life img{
cursor: pointer;
transition: all 0.7s;
}
.school_life img:hover{
transform: scale(1.4);
}
图片缓慢放大变透明消失css设置大小
#left1{
position: absolute;
left: 10%;
top:20%;
z-index: 2;
}
#left2{
position: absolute;
left: 10%;
top:40%;
z-index: 2;
}
#left3{
position: absolute;
left: 10%;
top:60%;
z-index: 2;
}
图片缓慢放大变透明消失css设置动画
.middle{
width: 185px;
height: 185px;
background: url('img/html5icon.png') center no-repeat;
margin: 100px auto 0 auto;
}
.middle img {
cursor: pointer;
animation: wuyue_move 3.3s infinite ease-in-out;
}
@keyframes wuyue_move {
0% {
transform: scale(1.0);
}
100% {
transform: scale(1.1);
opacity: 0;
}
}
鼠标触碰图片可暂停
#event_roll1{
width: 100%;
height: 200px;
overflow: hidden;
position:absolute;
top: 0px;
left: 0px;
}
#event_roll1 ul{
position: absolute;
left: 30px;
right: 0px;
}
#event_roll1 ul li{
float: left;
list-style:none;
width:278px;
height:128px;
margin-right: 5px;
}