before和after伪元素的问题

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>边框案例</title>
<style type="text/css">
div {
width: 500px;
height: 300px;
border: 1px solid black;
-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;
font-size: 24px;
font-weight: bold;
text-align: center;
line-height: 300px;
}
div:before,
div:after {
content: "";
width: 50px;
height: 50px;
display: block;
border: 1px solid black;
border-radius: 50%;
}
</style>
</head>
<body>
<div>大家好,欢迎来到慕课网!</div>
</body>
</html>4
收起
正在回答 回答被采纳积分+1
1回答

恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星