css3新增的属性:圆角边框、盒子阴影、文字阴影
1.圆角边框
语法:
border-radius:length
参数length则是圆的半径长度。
只设定特定的角。
border-top-right-radius: 15px
设置右上角为半径15px的圆弧。
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.yuan {
width: 200px;
height: 200px;
background-color:pink;
border-radius: 50%;
}
.s {
width: 200px;
height: 100px;
background-color:pink;
border-radius: 10px;
}
</style>
</head>
<body>
<div class="yuan">
</div>
<div class="s"></div>
</body>
</html>
盒子阴影
通过使用box-shadow
属性添加阴影。
语法:
box-shadow: h-shadow v-shadow blur spread color inset;
文字阴影
text-shadow:h-shadow v-shadow blur color;