<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>css3重要样式及属性</title>
<style type="text/css">
@keyframes myfirst {
from {
text-shadow: 0px 5px 5px #ffff00,
2px 5px 5px #ff8000,
4px 5px 5px #ff0000,
6px 5px 5px #ff0000,
8px 5px 5px #ff8800,
10px 5px 5px #ffff00;
}
to {
text-shadow: 0px 5px 5px #ff00ff,
2px 5px 5px #9d00ff,
4px 5px 5px #000cff,
6px 5px 5px #0184ff,
8px 5px 5px #01eaff,
10px 5px 5px #01ff8d;
}
}
/* text-shadow: h-shadow(必需。水平阴影的位置。允许负值) v-shadow(必需。垂直
阴影的位置。允许负值) blur(可选。模糊的距离。) color(阴影颜色);文本阴影: */
.box {
width: 800px;
margin: 0 auto;
}
p {
font-size: 50px;
animation: myfirst 2s infinite;
text-align: center;
line-height: 600px;
}
.div {
width: 666px;
height: 666px;
box-shadow: 0px 5px 5px #ff00ff,
2px 5px 5px #9d00ff,
4px 5px 5px #000cff,
6px 5px 5px #0184ff,
8px 5px 5px #01eaff,
10px 5px 5px #01ff8d;
}
.box1 {
width: 666px;
height: 666px;
transition: 1s;
}
.box1:hover {
box-shadow: 0px 0px 25px;
}
/* inset内投影 */
.box2 {
width: 300px;
height: 300px;
border-radius: 150px;
box-shadow: 0 0 2px #01eaff inset;
transition: 0.6s;
}
.box2:hover {
box-shadow: 0 0 300px #00aaff inset;
}
.box3 {
width: 600px;
height: 300px;
border-radius: 150px;
box-shadow: 0 0 20px #01eaff inset;
transition: 1s;
}
.box3:hover {
box-shadow: 0 0 600px #00aaff inset;
}
.box4 {
width: 300px;
height: 300px;
background-color: red;
border-radius: 10px 20px 30px 40px;
}
.box5 {
width: 300px;
height: 300px;
background-color: red;
border-radius: 10px 20px 30px;
}
.box6 {
width: 300px;
height: 300px;
background-color: red;
border-radius: 10px 20px;
}
/* 圆角边框
border-radius: 15px 50px 30px 5px
四个值: 左上角,右上角,右下角,左下角
border-radius: 15px 50px 30px
三个值: 左上角,右上角和左下角,右下角
border-radius: 15px 50px
两个值: 左上角与右下角,右上角与左下角
一个值:四个角*/
</style>
</head>
<body>
<div class="box">
<div class="div">
<p>hello 中国</p>
</div>
<br>
<div class="box1">
<p>we can changethe world</p>
</div><br />
<div class="box2"></div><br />
<div class="box3"></div><br />
<div class="box4"></div><br />
<div class="box5"></div><br />
<div class="box6"></div><br />
</div>
</body>
</html>