CSS 居中

1、水平或垂直居中 1. 單行內容垂直居中 /*height = line-height*/ .center{ height: 4em; line-height: 4em; overflow: hidden; /*保護佈局,非必須*/ } 支持:全部塊級、內聯元素、全部瀏覽器css 缺點:只能顯示一行html 2. div水平居中 <!--html代碼--> <d
相關文章
相關標籤/搜索