CSS methods for drawing various graphs
Square (Square)
#square { width:100px; height:100px; backgroud:red;}
Rectangle (Rectangle)
#rectangle { width:200px; height:100px; background:red;
Circle (Circle)
#circle { width:100px; height:100px; background:red; -moz-border-radius:50px; -webkit-border-radius:50px; border-radius:50px;}
/can use percent value (greater than 50%), but low version of Android does not support/
Oval (Oval)
#oval { width:200px; height:100px; background:red; -moz-border-radius:100px/50px; -webkit-border-radius:100px/50px; border-radius:100px/50px;}
/can use percent value (greater than 50%), but low version of Android does not support/
Triangle up (triangle up)
#triangle-up { width:0; height:0; border-left:50px solid transparent; border-right:50px solid transparent; border-bottom:100px solid Red;}
Triangle Down (downward)
#triangle-down { width:0; height:0; border-left:50px solid transparent; border-right:50px solid transparent; border-top:100px solid Red;}
Triangle Left (leftwards)
#triangle-left { width:0; height:0; border-top:50px solid transparent; border-right:100px solid red; border-bottom:50px solid Transparent;}
Triangle Right (Rightwards)
#triangle-right { width:0; height:0; border-top:50px solid transparent; border-left:100px solid red; border-bottom:50px solid Transparent;}
CSS methods for drawing various graphs
Square (Square)
#square { width:100px; height:100px; backgroud:red;}
Rectangle (Rectangle)
#rectangle { width:200px; height:100px; background:red;
Circle (Circle)
#circle { width:100px; height:100px; background:red; -moz-border-radius:50px; -webkit-border-radius:50px; border-radius:50px;}
/can use percent value (greater than 50%), but low version of Android does not support/
Oval (Oval)
#oval { width:200px; height:100px; background:red; -moz-border-radius:100px/50px; -webkit-border-radius:100px/50px; border-radius:100px/50px;}
/can use percent value (greater than 50%), but low version of Android does not support/
Triangle up (triangle up)
#triangle-up { width:0; height:0; border-left:50px solid transparent; border-right:50px solid transparent; border-bottom:100px solid Red;}
Triangle Down (downward)
#triangle-down { width:0; height:0; border-left:50px solid transparent; border-right:50px solid transparent; border-top:100px solid Red;}
Triangle Left (leftwards)
#triangle-left { width:0; height:0; border-top:50px solid transparent; border-right:100px solid red; border-bottom:50px solid Transparent;}
Triangle Right (Rightwards)
#triangle-right { width:0; height:0; border-top:50px solid transparent; border-left:100px solid red; border-bottom:50px solid Transparent;}
More CSS how to draw various graphics related articles please follow topic.alibabacloud.com!