Maison  >  Article  >  interface Web  >  关于CSS3三角的实现_html/css_WEB-ITnose

关于CSS3三角的实现_html/css_WEB-ITnose

WBOY
WBOYoriginal
2016-06-24 11:44:18928parcourir

1,向上的三角

 1 
 2 
 3 
 4 
 5  border-radius title >
 6 
 7  div{  
 8      width: 0;
 9      height: 0;
10      border-left: 20px solid transparent;
11      border-right: 20px solid transparent;
12      border-bottom: 20px solid #ccc;
13      }
14  style >
15  head >
16 
17 
18  div >
19  body >
20  html >

2,向下的三角

 1 
 2 
 3 
 4 
 5  border-radius title >
 6 
 7  div{  
 8      width: 0;
 9      height: 0;
10      border-left: 20px solid transparent;
11      border-right: 20px solid transparent;
12      border-top: 20px solid #ccc;
13      }
14  style >
15  head >
16 
17 
18  div >
19  body >

20 

Déclaration:
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn