before和after伪元素的问题
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | <!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积分~
来为老师/同学的回答评分吧