成人在线亚洲_国产日韩视频一区二区三区_久久久国产精品_99国内精品久久久久久久

您的位置:首頁(yè)技術(shù)文章
文章詳情頁(yè)

前端 - 能不能用 CSS3 畫(huà)出以下圖形?感謝!

瀏覽:119日期:2023-07-22 13:59:31

問(wèn)題描述

圖形如下,就是一個(gè)大闊號(hào),箭頭向下。但非前端專(zhuān)業(yè),做的時(shí)候自己無(wú)從下手,希望高手指點(diǎn)。謝謝。

前端 - 能不能用 CSS3 畫(huà)出以下圖形?感謝!

如果不能,那只能用圖片了。用圖片無(wú)法方便控制長(zhǎng)度,比較麻煩。

問(wèn)題解答

回答1:

http://codepen.io/lizzz0523/pen/Xmqzxw

回答2:

@lizzz_led 的回答很棒。

我也來(lái)貢獻(xiàn)個(gè)答案吧。主要是減少輸入的計(jì)算變量,只需考慮修復(fù) .quote 的高度以及圓角的寬度

<p class='quote'><p></p></p> <style type='text/css'> .quote {position: relative;width: 100%; /* any width */height: 40px;/* fix zero height */ } .quote::before, .quote::after, .quote ::before, .quote ::after {content: ’’;display: block;position: absolute;width: calc(50% - 20px);height: 20px;border-style: solid;border-color: #000;border-width: 0; } .quote ::before, .quote ::after {top: 0;border-bottom-width: 1px; } .quote::before, .quote::after {top: 20px;border-top-width: 1px; } .quote ::before {left: 0;border-bottom-left-radius: 20px; } .quote ::after {right: 0;border-bottom-right-radius: 20px; } .quote::before {left: 20px;border-top-right-radius: 20px; } .quote::after {right: 20px;border-top-left-radius: 20px; } </style>回答3:

不能, 能用 canvas 實(shí)現(xiàn), 畫(huà)2跟賽貝爾曲線就行了。建議還是用圖片吧。

回答4:

還是用圖片吧。。。

回答5:

用圖片吧,居中顯示, 兩側(cè)的上翹部分用before,after調(diào)試一下吧. 這樣也就最大程度上適應(yīng)了吧

回答6:

即使用圖片,拉長(zhǎng)變形了,也不難看吧

回答7:

是我孤陋寡聞,ccs3什么鬼,只用過(guò)css3

標(biāo)簽: CSS
相關(guān)文章: