第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會有你想問的

如何用css3繪制有邊框的三角形

如何用css3繪制有邊框的三角形

犯罪嫌疑人X 2019-05-31 03:02:56
如何用css3繪制有邊框的三角形
查看完整描述

3 回答

?
回首憶惘然

TA貢獻(xiàn)1847條經(jīng)驗(yàn) 獲得超11個(gè)贊

CSS:
.arrow-top,.arrow-right,.arrow-bottom,.arrow-left{
border: 20px solid green;
}
.arrow-top{
border-right-color: transparent;
border-left-color: transparent;
border-bottom-color: transparent;
}
.arrow-right{
border-right-color: transparent;
border-top-color: transparent;
border-bottom-color: transparent;
}
.arrow-bottom{
border-right-color: transparent;
border-left-color: transparent;
border-top-color: transparent;
}
.arrow-left{
border-top-color: transparent;
border-left-color: transparent;
border-bottom-color: transparent;
}
Html:
<span class="arrow-top"></span>
<span class="arrow-right"></span>
<span class="arrow-bottom"></span>
<span class="arrow-left"></span>

 



查看完整回答
反對 回復(fù) 2019-06-01
?
精慕HU

TA貢獻(xiàn)1845條經(jīng)驗(yàn) 獲得超8個(gè)贊

1、新建一個(gè)html5網(wǎng)頁,名稱為index.html,在<body>代碼中寫上四個(gè)div,分別是向上、向下、向左,向右四個(gè)三角形,代碼如下:
<div class="triangle-up"> <!--向上的三角--> </div>
<div class="triangle-down"> <!--向下的三角--> </div>
<div class="triangle-left"> <!--向左的三角--> </div>
<div class="triangle-right"> <!--向右的三角--> </div>
2、然后新建一個(gè)css文件style.css,并在index.html中引入,引入代碼:<link rel="stylesheet" type="text/css" href="style.css">
3、先做向上的三角形,這里有兩種寫法,大家可以參考下。在css文件中輸入以下代碼:
第一種: .triangle-up {
width:0;
height:0;
border-left:30px solid transparent;
border-right:30px solid transparent;
border-bottom:30px solid #fff;
}
第二種:.triangle-up {
width:0;
height:0;
border:30px solid transparent;
border-bottom-color:#fff;
}
4、接下來寫向下的三角形,繼續(xù)在css文件中輸入以下代碼:
.triangle-down {
width:0;
height:0;
border-left:20px solid transparent;
border-right:20px solid transparent;
border-top:20px solid #0066cc;
}
5、然后是向左的三角形,代碼為:
.triangle-left {
width:0;
height:0;
border-top:30px solid transparent;
border-bottom:30px solid transparent;
border-right:30px solid yellow;
}
6、最后是向右的三角形,代碼為:
.triangle-right {
width:0;
height:0;
border-top:50px solid transparent;
border-bottom: 50px solid transparent;
border-left: 50px solid green;
}

 



查看完整回答
反對 回復(fù) 2019-06-01
  • 3 回答
  • 0 關(guān)注
  • 496 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號