关于border绘制三角形的问题
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><head> <title>css五角星绘制</title> <style type="text/css"> *{ margin: 0 auto; padding: 0 auto; border: none; } .bottom{ background: red; position: relative; top:100px; width: 600px; height: 400px; } .star{ width: 0px; height: 0px; border-top: 73px solid yellow; border-left: 100px solid transparent; border-right: 100px solid transparent; } </style></head><body><div class="bottom"> <div class="star star1"></div> <div class="star star2"></div> <div class="star star3"></div> <div class="star star4"></div> <div class="star star5"></div></div></body></html> |
32
收起
正在回答 回答被采纳积分+1
HTML5与CSS3实现动态网页 2018
- 参与学习 1887 人
- 提交作业 4643 份
- 解答问题 5760 个
有HTML和CSS基础,却不知道如何进阶?本路径带你通过系统学习,完成从“会做网页”到“做出好的动态网页”的蜕变,迈出成为前端工程师的第一步。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星