CSS 重置(reset)指的是重置浏览器的默认样式,完成 CSS 初始化。
这是一个老外发的初始化 CSS 代码,比较符合我的使用习惯,简洁,不干涉太多,比较好用。
/*
Josh's Custom CSS Reset
https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html, body {
height: 100%;
}
body {
line-height: 1.5;...
话题CSS共有相关文章 3 篇。
CSS 实现从上到下淡入效果

html 部分
<div class="target"></div>
css 部分
.target {
position: relative;
-webkit-animation: fadeDown 0.5s;
-moz-animation: fadeDown 0.5s;
-ms-animation: fadeDown 0.5s;
-o-animation: fadeDown 0.5s;
animation: fadeDown 0.5s;
}
@-webkit-keyframes fadeDown {
0%...
display:flex 子元素固定宽度和对齐

.parent {
display: flex;
flex-wrap: wrap;
}
.children {
width: 50%;
}
flex-flow 子元素排列方式,是 flex-direction 和 flex-wrap 属性的复合属性,默认值: row nowrap。
方向 flex-direction 属性:
row 横
row-reverse 横 倒序
column 列
column-reverse 列 倒序
是否拆行或拆列 flex-wrap 属性:
nowrap 不换行
wrap 换行
wrap-reverse 镜像
justi...
最新评论