Home > Web Front-end > HTML Tutorial > Use CSS to realize Yin Yang Bagua chart and other graphics_html/css_WEB-ITnose

Use CSS to realize Yin Yang Bagua chart and other graphics_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:03:33
Original
1262 people have browsed it

CSS is quite powerful and can realize shapes such as the classical Chinese "Yin Yang Bagua Diagram".


Square


   #rectangle { width: 200px; height: 100px; backgrount-color: red; }  #circle { width: 100px; height: 100px; -webkit-border-radius: 100px; -moz-border-radius: 100px; border-radius: 100px; background-color: red; }
Copy after login

Oval


  #triangle-up { width: 0; height: 0; border-left: 50px solid transparent; border-right: 50px solid transparent; border-bottom: 100px solid red; }
Copy after login

Right triangle

Right-angled side left-top


  #triangle-leftbottom { width: 0; height: 0; border-left: 100px solid red; border-top: 100px solid transparent; }
Copy after login
Right-angled side right-top


  #triangle-righttop { width: 0; height: 0; border-right: 100px solid red; border-top: 100px solid transparent; }
Copy after login

Trapezoid


  #parallelogram { width: 150px; height: 100px; -webkit-transform: skew(20deg); -moz-transform: skew(20deg); transform: skew(20deg); background: red; }
Copy after login

Eggs


  #yin-yang { width: 96px; height: 48px; background: #eee; border-color: red; border-style: solid; border-width: 2px 2px 55px 2px; border-radius: 100%; position: relative; }  #yin-yang:before { content: ""; position: absolute; top: 50%; left: 0; background: #eee; border: 18px solid red; border-radius: 100%; width: 12px; height: 12px; }  #yin-yang:after { content: ""; position: absolute; top: 50%; left: 50%; background: red; border: 18px solid #eee; border-radius:100%; width: 12px; height: 12px; } 八卦图展示不出来,蛋疼,请下载HTML文件 http://download.csdn.net/detail/huoyingfans/7455161或者 去 http://blog.fansunion.cn/articles/3736 查看
Copy after login
更多文章请参考:http://www.itfriend.cn/user/FansUnion 
Copy after login

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template