The practice and use of div+css for small triangles in web pages

Source: Internet
Author: User
Tags modify sort xmlns
css| Web page

This is the first small triangle of the wording:
#com_a {border-top:10px solid #FFFFCC; border-left:10px solid #FF3300; border-bottom:10px solid #FFFFCC;}

Here are some small triangles; can extrapolate; make more;

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "><ptml xmlns=" http://www.w3.org/1999/xhtml "><pead><title></title><style>*{ margin:0; padding:0; font-size:12px; Font-family:verdana, "Song Body", Arial; line-height:1.8; List-style:none;} #info, #nav {margin:50px; border:1px dashed #FF3300; background: #FFFFCC; padding:50px;} #info div{background: #FF0000; width:0px; height:0px; overflow:hidden; margin-bottom:10px;} * * Some triangular writing/#com_a {border-top:10px solid #FFFFCC; border-left:10px solid #FF3300; border-bottom:10px solid #FFFFCC;} #com_b {border-top:10px solid #FFFFCC; border-right:10px solid #FF3300; border-bottom:10px solid #FFFFCC;} #com_c {border-top:10px solid #FFFFCC border-right:10px solid #FF3300 border-bottom:10px solid #FFFFCC Border-left : 10px solid #FF3300;} #com_d {border-top:10px solid #FF3300 border-right:10px solid #FFFFCC border-bottom:10px solid #FF3300 Border-left : 10px solid #FFFFCC;}#com_e {border-top:10px solid #FFFFCC; border-left:10px solid #FF3300;} #com_f {border-top:10px solid #FF3300; border-right:10px solid #FFFFCC; border-left:10px solid #FFFFCC;} #com_g {border-right:10px solid #FFFFCC; border-bottom:10px solid #FF3300; border-left:10px solid #FFFFCC;} #com_h {border-top:10px solid #FF3300; border-bottom:10px solid #FF3300; border-left:10px solid #FFFFCC;} #com_i {border-top:10px solid #FF3300 border-right:10px solid #FF3300 border-bottom:10px solid #FF3300 Border-left : 10px solid #FFFFCC;} </style></head><body><div id= "Info" ><p> some triangular notation </p> <div id= "Com_a" > </div> <div id= "Com_b" ></div> <div id= "Com_f" ></div> <div id= "Com_g" ></div > <div id= "com_c" ></div> <div id= "com_d" ></div> <div id= "Com_e" ></div> <div Id= "Com_h" ></div> <div id= "Com_i" ></div></div></body></html>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]

Here is an example of an application:

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd "><ptml xmlns=" http://www.w3.org/1999/xhtml "><pead><title></title><style>*{ margin:0; padding:0; font-size:12px; Font-family:verdana, "Song Body", Arial; line-height:1.8; List-style:none;} #nav {margin:50px; border:1px dashed #FF3300; background: #FFFFCC; padding:50px;} A:link,a:visited{color: #FF6600; text-decoration:none;} a:hover,a:active{color: #FF0000;} #nav a span{overflow:hidden; border-top:6px solid #FFFFCC border-left:6px solid #FFFFCC border-bottom:6px Solid #FFFFCC ; height:0px; width:0px; margin:2px 2px 0-10px; Position:absolute} #nav a:hover span{background: #CC3300; border-top:6px solid #FFFFCC; border-left:6px solid #FF3300; BORDER-BOTTOM:6PX solid #FFFFCC; overflow:hidden; Float:left;} An example of </style></head><body><div id= "NAV" ><p> application </p> <ul> <li>< A href= "http://www.webjx.com" target="_blank" ><span></span> website home </a></li> <li><a href= "http://www.webjx.com/ htmldata/sort/5.html "target=" _blank "><span></span> Web effects </a></li> <li><a href= "http://www.webjx.com/htmldata/sort/3.html" target= "_blank" ><span></span> Web page production </a></li > <li><a href= "http://www.webjx.com/htmldata/sort/15.html" target= "_blank" ><span></span > Video Tutorials </a></li> <li><a href= "http://www.webjx.com/bbs/" target= "_blank" ><span> </span> website Forum </a></li> </ul></div></body></html>

[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.