MySQL
Linux
Centos
Ubuntu
PHP
Windows
CSS3
帳號登入
MySQL
Linux
Ubuntu
CentOS
PHP
Windows
CSS3
編碼的世界 / 優質文選 /
生涯
css 右邊對齊
2021年11月04日
-
書箋
margin-left :auto 是把父層左邊的都充滿 然後就把子層div頂到了最右邊
text-align:right 是把子層的文字 放到右邊 ,這樣頂過來以後 , 就是和右邊的邊邊對齊了
margin-left:auto 不能和 float :一起使用 ,如果一起使用,margin-left:auto失去作用
使用外邊距的 方法
1 float 可以和 margin-left:(數字)一起用
2 想用margin-left:auto 就不能用 float 浮動
熱門文章