天天操天天操-欧美黄视频-亚洲午夜激情-黄色网址免费-少妇精品无码一区二区三区-欧美成人免费在线视频-国产毛片一区二区三区-欧美一区二区三区婷婷月色-四虎影视库-日本在线高清-毛片999-天天操欧美-国产午夜伦理-手机福利在线-视频在线91-免费在线观看亚洲-好爽快一点高潮了-国产污视频在线-成 人片 黄 色 大 片-激情久久网站-丰满少妇xxxx-女教师在办公室被躁在线播放-亚洲高清色-视色视频在线观看-婷婷色5月-又粗又硬又黄又爽的视频-好大好湿好硬顶到了好爽视频-中国美女黄色-国产精品刮毛-国内三级在线观看

用CSS繪制三角形箭頭

2016/11/3 8:59:24   閱讀:2236    發(fā)布者:2236

用CSS繪制三角形箭頭。使用純CSS,你只需要很少的代碼就可以
創(chuàng)作出各種瀏覽器都兼容的三角形箭頭!

 

CSS代碼:

/* create an arrow that points up */ 
div.arrow-up { 
    width: 0;  
    height: 0;  
    border-left: 5px solid transparent;  /* left arrow slant */ 
    border-right: 5px solid transparent; /* right arrow slant */ 
    border-bottom: 5px solid #2f2f2f; /* bottom, add background color here */ 
    font-size: 0; 
    line-height: 0; 
} 

/* create an arrow that points down */ 
div.arrow-down { 
    width: 0;  
    height: 0;  
    border-left: 5px solid transparent; 
    border-right: 5px solid transparent; 
    border-top: 5px solid #2f2f2f; 
    font-size: 0; 
    line-height: 0; 
} 

/* create an arrow that points left */ 
div.arrow-left { 
    width: 0;  
    height: 0;  
    border-bottom: 5px solid transparent;  /* left arrow slant */ 
    border-top: 5px solid transparent; /* right arrow slant */ 
    border-right: 5px solid #2f2f2f; /* bottom, add background color here */ 
    font-size: 0; 
    line-height: 0; 
} 

/* create an arrow that points right */ 
div.arrow-right { 
    width: 0;  
    height: 0;  
    border-bottom: 5px solid transparent;  /* left arrow slant */ 
    border-top: 5px solid transparent; /* right arrow slant */ 
    border-left: 5px solid #2f2f2f; /* bottom, add background color here */ 
    font-size: 0; 
    line-height: 0; 
} 

繪制這些三角形的關(guān)鍵在于,你要讓箭頭所指方向的兩個側(cè)邊有很粗的邊框。而背向箭頭
方向的一邊也是同樣粗的邊框,而這條邊的顏色就是你的三角形的顏色。邊框越粗,
三角形越大。用這種方法你可以繪制出各種顏色、各種大小、各種朝向的箭頭。
最妙的是,你只需要幾行CSS代碼就能實現(xiàn)這種效果。