outline 属性是用于设置以下各个轮廓属性的简写属性
实例代码:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<style>
.out1{
outline:3px dashed black;
}
.out2{
outline:3px dotted red;
}
.out3{
outline:5px solid yellow;
}
.out4{
outline:thick ridge pink;
}
p,h1{
width:300px;
margin-left:10px;
}
</style>
</head>
<body>
<h1>outline 简写属性</h1>
<p class="out1">点状轮廓</p>
<p class="out2">红色的点状轮廓</p>
<p class="out3">5像素的黄色实线轮廓</p>
<p class="out4">粗的粉色凸脊轮廓</p>
</body>
</html>
~
运行效果:
评论