border的屬性
1.border-width:不支援百分比,支援關鍵字,thin(1px),medium(預設值,3px,預設值是3px的原因是只有當border是3px以上時,border-style才有效
果實),thick(5px)
#2.border- style:有不同值,以下分析分別為不同值時的應用
a.solid:可以實現三角,梯形
nbsp;html> <title>用solid实现三角和梯形</title> <meta> <style> .triangle{ width: 0px; height: 0px; border-style:solid; border-width: 50px; border-color: red transparent transparent transparent; } .trapezia{ width: 40px; height: 40px; border-style: solid; border-width: 50px; border-color:transparent transparent green transparent ; margin-top: 10px; } </style><p></p>我是三角形<p></p>我是梯形
b.dashed:虛線,在chrome/Firefox瀏覽器中,虛線和實線的比例是3:1(稀),在IE瀏覽器中,比例是2:1(密)
c.dotted:點線,在chrome/Firefox瀏覽器中,是方點,在IE瀏覽器中,是圓點(可以利用圓點實現圓角效果)
d.double:雙線,計算規則,雙線寬度永遠相等,中間間隔+-1,例如,3px=1(內)+1(中間間隔)+1(外),可以實現三道槓圖形。
e.inset(內凹),outset(外凸),ridge(溝槽):風格過時,相容性差,沒有什麼使用場景
3.border-color:在不指定color時,使用color作為邊框色,可以利用此特性,簡化連結改變顏色時的css樣式程式碼。例如:
nbsp;html> <title>鼠标移动时边框颜色的改变</title> <meta> <style> .a{ width: 30px; height: 30px; padding: 20px; margin:30px; color: red; border:1px solid; } .a:hover{ color: blue;/* border:1px solid;*/ } </style><p>哈哈</p>
4.利用border可以實現背景圖像的定位,因為背景圖像在定位時是不計算border的
5.利用border實現等高佈局,缺點是不支援百分比寬度
(4,5類似,都是利用border,使得與某側距離固定)
以上是關於CSS之border屬性的詳細介紹的詳細內容。更多資訊請關注PHP中文網其他相關文章!

是的,youshouldlearnbothflexboxandgrid.1)flexboxisidealforone-demensional,flexiblelayoutslikenavigationmenus.2)gridexcelstcelsintwo-dimensional,confffferDesignssignssuchasmagagazineLayouts.3)blosebothenHancesSunHanceSlineHancesLayOutflexibilitibilitibilitibilitibilityAnderibilitibilityAndresponScormentilial anderingStruction

重構自己的代碼看起來是什麼樣的?約翰·瑞亞(John Rhea)挑選了他寫的一個舊的CSS動畫,並介紹了優化它的思維過程。

CSSanimationsarenotinherentlyhardbutrequirepracticeandunderstandingofCSSpropertiesandtimingfunctions.1)Startwithsimpleanimationslikescalingabuttononhoverusingkeyframes.2)Useeasingfunctionslikecubic-bezierfornaturaleffects,suchasabounceanimation.3)For

@keyframesispopularduetoitsversatoryand and powerincreatingsmoothcsssanimations.keytricksinclude:1)definingsmoothtransitionsbetnestates,2)使用AnimatingMultatingMultationMultationProperPertiessimultane,3)使用使用4)使用BombingeNtibalibility,4)使用CombanningWiThjavoFofofofoftofofo

CSSCOUNTERSAREDOMANAGEAUTOMANAMBERINGINWEBDESIGNS.1)他們可以使用forterablesofcontents,ListItems,and customnumbering.2)AdvancedsincludenestednumberingSystems.3)挑戰挑戰InclassINCludeBrowsEccerCerceribaliblesibility andperformiballibility andperformissises.4)創造性

使用滾動陰影,尤其是對於移動設備,是克里斯以前涵蓋的一個微妙的UX。傑夫(Geoff)涵蓋了一種使用動畫限制屬性的新方法。這是另一種方式。


熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

禪工作室 13.0.1
強大的PHP整合開發環境

DVWA
Damn Vulnerable Web App (DVWA) 是一個PHP/MySQL的Web應用程序,非常容易受到攻擊。它的主要目標是成為安全專業人員在合法環境中測試自己的技能和工具的輔助工具,幫助Web開發人員更好地理解保護網路應用程式的過程,並幫助教師/學生在課堂環境中教授/學習Web應用程式安全性。 DVWA的目標是透過簡單直接的介面練習一些最常見的Web漏洞,難度各不相同。請注意,該軟體中

VSCode Windows 64位元 下載
微軟推出的免費、功能強大的一款IDE編輯器

SAP NetWeaver Server Adapter for Eclipse
將Eclipse與SAP NetWeaver應用伺服器整合。

PhpStorm Mac 版本
最新(2018.2.1 )專業的PHP整合開發工具