CSS 实用技巧:制作三角形_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:38:09
Original
1301 people have browsed it

实现如图所示的三角形图标:

html代码如下:

Copy after login

css样式:

body{background:#faf7ef;}div{margin:20px auto}div.arrow-up {  width:0px;  height:0px;  border-left:50px solid transparent;    border-right:50px solid transparent;   border-bottom:50px solid #ff0000;   font-size:0px;  line-height:0px;} div.arrow-down {  width:0px;  height:0px;  border-left:50px solid transparent;  border-right:50px solid transparent;  border-top:50px solid #0000ff;  font-size:0px;  line-height:0px;} div.arrow-left {  width:0px;  height:0px;  border-bottom:50px solid transparent;    border-top:50px solid transparent;   border-right:50px solid #008000;   font-size:0px;  line-height:0px;} div.arrow-right {  width:0px;  height:0px;  border-bottom:50px solid transparent;   border-top:50px solid transparent;   border-left:50px solid #ffff00;   font-size:0px;  line-height:0px;}
Copy after login

 

作者:风雨后见彩虹

出处:http://www.cnblogs.com/moqiutao/

如果您觉得本文对您的学习有所帮助,请多支持与鼓励。

 

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!