目录
1、边框效果
1)、圆角属性
border-radius ,赋值顺序是 上、右、下、左。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
width:100px;
height: 100px;
border: 1px solid black;
margin: 4px;
}
div:nth-of-type(1){
border-radius: 12px 13px 14px 5px;
}
div:nth-of-type(2){
border-radius: 22px ;
}
div:nth-of-type(3){
border-radius: 22px 50px;
}
div:nth-of-type(4){
border-radius: 50%;
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
<div></div>
</body>
</html>
2)、边框阴影
box-shadow : 水平阴影 垂直阴影 羽化值 阴影大小 阴影颜色 阴影类别(内部inset|外部outset)。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
width:300px;
height:100px;
background-color:coral;
box-shadow: 10px 10px 5px 1px gray;}
}
</style>
</head>
<body>
<div></div>
</body>
</html>
做几个图:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
div{
width:100px;
height: 100px;
border: 1px solid black;
margin: 4px;
}
div:nth-of-type(1){
background: red;
border-radius: 10%;
box-shadow: 10px 10px 5px 2px gray;
}
div:nth-of-type(2){
border:0px;
border-bottom: green solid 50px;
border-radius: 0px 0px 100px 0px;
-webkit-transform: scale(0.3,0.3);
}
div:nth-of-type(3){
width: 0px;
height: 0px;
/*background: blue;*/
/*transparent : 表示背景透明*/
border-top:30px solid transparent;
border-left:30px solid red;
border-bottom:30px solid transparent;
border-right:30px solid transparent;
-webkit-transform: scale(0.3,0.3);
}
</style>
</head>
<body>
<div></div>
<div></div>
<div></div>
</body>
</html>
演示结果如下:
3)、文字阴影
text-shadow : 水平偏移 垂直偏移 模糊 颜色 。
2、文字效果
一行或多行显示。