HTML attr

定義

在html建立自定義的屬性,並連結到相對應的CSS

範例

div(data-size="small", data-color="red") 按鈕
div
 border: solid 2px
 
 div[data-size="small"]
 width: 150px
 height: 50px

 div[data-color="red"]
 border-color: #FF6B6B

Display

按鈕

Leave a Reply

Your email address will not be published. Required fields are marked *