We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.替换元素
<img>
2.如何将一个替换元素变成一个非替换
3.content的特性
4.content内容生成技术
5.padding属性
.box{ padding: 10% 50%; position: reletive; } .box img{ position: absolute; width: 100%; height: 100% left: 0; top: 0 }
button{ position: absolute; clip: rect(0,0,0,0); } label{ display: inline-block; line-height: 20px; padding: 10px; } <button id="btn"></button> <label for="btn">click</label>
.icon{ display: inline-block; width: 14px; height: 1px; padding: 3px 0; border-top: 1px solid; border-bottom: 1px solid; background-color: currentColor; background-clip: content-box; }
6.margin属性
.column-box{ over-flow: hidden; } .son, .child{ margin-bottom: -9999px; padding-bottom: 9999px }
margin: auto
如果一侧定值,一侧auto,则auto为剩余空间大小(margin初始值为0) 如果两侧均是auto,则平分剩余空间
触发margin:auto的前提条件是对应方向会自动填充,所以一般高度不会自适应,可以使用writing-mode: vertical-lr改变文档流方向,而这样水平方向无法居中,所以需要设置position,将正常流宽度改变成格式化宽度和格式化高度
margin:auto
writing-mode: vertical-lr
(1) 绝对定位元素非定为方向的margin值无效 (2)定高容器的子元素的margin-bottom或者定宽元素的子元素的margin-right无效
The text was updated successfully, but these errors were encountered:
No branches or pull requests
1.替换元素
<img>
效率最高2.如何将一个替换元素变成一个非替换
chrome浏览器所有元素都支持content属性,而在其他浏览器仅在::before或::after中支持
3.content的特性
4.content内容生成技术
正在加载...
5.padding属性
6.margin属性
-利用margin实现等高
margin: auto
的作用触发
margin:auto
的前提条件是对应方向会自动填充,所以一般高度不会自适应,可以使用writing-mode: vertical-lr
改变文档流方向,而这样水平方向无法居中,所以需要设置position,将正常流宽度改变成格式化宽度和格式化高度The text was updated successfully, but these errors were encountered: