如何用纯css3绘制圆柱体

momoyy123
浏览 5425回答 1
1回答

xdlumia

<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Document</title></head><style>.yuanzhu{ position: relative; height: 200px; width: 50px; margin-top: 30px; background:red;margin:30px auto; z-index: 999  }.yuanzhu:before{position: absolute; top:-10px; content: ""; display: block; width: 50px; height: 20px; border-radius:50%; background: #000;  z-index: 99}.yuanzhu:after{position: absolute; bottom:-10px; content: ""; display: block; width: 50px; height: 20px; border-radius:50%; background: red; z-index: 9 }</style><body><div></div></body></html>这个是源代码
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

CSS3