Home > Web Front-end > HTML Tutorial > css制作的圆,三角形,椭圆,箭头图标_html/css_WEB-ITnose

css制作的圆,三角形,椭圆,箭头图标_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:22:14
Original
1410 people have browsed it

自从css3发布后,起功能变得非常强大,以前很多需要图片完成的icon,现在只需要几段css代码就可以完成。下面是css制作的圆,椭圆,三角形,箭头图标。

圆:

.yuan{    width:100px;    height:100px;    -moz-border-radius:50%;     -webkit-border-radius:50%;     border-radius:50%;     background-color:red;}<div class="yuan"></div>
Copy after login



椭圆

.oval {     width: 200px;     height: 100px;     background-color: red;     -moz-border-radius: 100px / 50px;     -webkit-border-radius: 100px / 50px;     border-radius: 100px / 50px; }<div class="oval"></div>
Copy after login



箭头:

.arrow{    content: '';    position: absolute;    width: 30px;    height: 30px;    border: 10px solid #f5b24a;    -webkit-transform: rotate(-135deg);    -moz-transform: rotate(-135deg);    -o-transform: rotate(-135deg);    -ms-transform: rotate(-135deg);    transform: rotate(-135deg);    border-top: none;    border-right: none;    top: 9px;}<span class="arrow"></span>
Copy after login



三角形:

.rencentle {    width: 0;    height: 0;    border-left: 50px solid transparent;    border-right: 50px solid transparent;    border-bottom: 100px solid red;}<div class="rencentle"></div>
Copy after login

 

本文转自:http://www.manongjc.com/article/57.html

更多关于css制作图案的文章:

css border实现的三角形图案

css 巧用border属性制作各种图形(矩形,梯形,三角形)

css制作的圆,三角形,椭圆,箭头图标

css3 border-radius圆角盒子

去掉iphone Safari浏览器下input submit 和按钮的圆角

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