Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
檀越@新空间
Coding Tree
提交
f4553358
C
Coding Tree
项目概览
檀越@新空间
/
Coding Tree
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
Coding Tree
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
f4553358
编写于
1月 26, 2022
作者:
彭世瑜
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix
上级
e1aab88f
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
110 addition
and
2 deletion
+110
-2
blog/front-end-learn/css-product-2.md
blog/front-end-learn/css-product-2.md
+109
-1
blog/front-end-learn/demo/css-decorate-4.html
blog/front-end-learn/demo/css-decorate-4.html
+1
-1
未找到文件。
blog/front-end-learn/css-product-2.md
浏览文件 @
f4553358
...
...
@@ -80,4 +80,112 @@ uploads/ 非固定使用的图片素材
```
https://www.bilibili.com/video/BV1Kg411T7t9?p=177&spm_id_from=pageDriver
base.css
```
css
/* base.css 清除默认样式*/
/*清除常见标签的margin和padding*/
body
,
h1
,
h2
,
h3
,
h4
,
h5
,
h6
,
p
,
ul
,
ol
,
li
,
dl
,
dt
,
dd
,
input
{
margin
:
0
;
padding
:
0
;
}
/*内减模式*/
*
{
box-sizing
:
border-box
;
}
/*设置网页统一的字体大小,行高,字体系列 */
body
{
font
:
16px
/
1.5
Arial
,
'Microsoft Yahei'
,
sans-serif
;
color
:
#333
;
}
/*去除列表默认样式*/
ul
,
ol
{
list-style
:
none
;
}
/*去除默认倾斜*/
i
,
em
{
font-style
:
normal
;
}
/*去除a标签下划线,并设置默认文字颜色*/
a
{
text-decoration
:
none
;
color
:
#333
;
}
/*设置img垂直对齐方式为居中对齐,去除默认下间隙*/
img
{
vertical-align
:
middle
;
}
/* 去除input默认样式 */
input
{
border
:
none
;
outline
:
none
;
color
:
#333
;
}
/*左浮动*/
.fl
{
float
:
left
;
}
/*右浮动*/
.fr
{
float
:
right
;
}
/*双伪元素清除浮动*/
.clearfix
::before
,
.clearfix
::after
{
content
:
''
;
display
:
table
;
}
.clearfix
::after
{
clear
:
both
;
}
```
common.css
```
css
/* 版心居中 */
.wrapper
{
width
:
1240px
;
margin
:
0
auto
;
}
/* 让文字看不见 */
font-size
:
0
;
```
绝对定位,盒子具备行内块特点
对齐方式:
1.
vertical-align
2.
行高
3.
定位
https://www.bilibili.com/video/BV1Kg411T7t9?p=187&spm_id_from=pageDriver
blog/front-end-learn/demo/css-decorate-4.html
浏览文件 @
f4553358
...
...
@@ -3,7 +3,6 @@
width
:
400px
;
height
:
400px
;
background-color
:
skyblue
;
/* 水平居中 */
text-align
:
center
;
}
...
...
@@ -19,6 +18,7 @@
height
:
200px
;
width
:
200px
;
/* 垂直居中 */
/*方式一*/
vertical-align
:
middle
;
/*方式二*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录