css
2021年4月26日
23:47
告诉浏览器布局
颜色
@[toc]
构成
P | { | Color | : | Red | ; | } |
---|---|---|---|---|---|---|
select/ | Property=color | Value=red | ||||
——-
添加方法
外部样式表v
css保存在.css文件
html中
<link/>
引用
Style.css
|
|
内部样式表v
不使用外部文件
放在html的
<style>
文件
H1{
color: red;
}
内联样式x
一个元素的css
元素的
<style>
<h1 style=>
.box
<div class >
<p | Class= | “paragraph” | Id= | “paral” | Lorem | ||
---|---|---|---|---|---|---|---|
Selector=p | Selector=paragrahp | Select=paral | |||||
class有很多 | html确保独一无二 |
https://developer.mozilla.org/cn-Zh/docs/learn/CSS 选择器、color_value
参数
Background-color:
color
width
margin: auto
颜色
颜色
Hsl | (色相, | 饱和度, | 亮度) |
---|---|---|---|
0~360° | 0~100% | 0~100% | |
不同颜色 | 灰~全色 | 黑~白 |
-——
字体
Font-family: | 字体名 | 参数 |
---|---|---|
指定字体 | 有空格要加引号 | serif(衬线) |
size大小 weight粗细 Font: nomal 16px ziti,canshu也可以 | monospace(等宽) |
Styling_text
Cssfontstack.com
Fonts.google.com
Thetype.com
-——–
代表整个页面
Body {
未指定用body
}
-——
盒子模型
Content | Height | Width | Padding | Border | Margin |
---|---|---|---|---|---|
图片、文字占地 | 内边距:内容和边框的距离 | 边框:p&h没有边框,但可指定 | 外边距:与外面元素的距离 |
盒子间只有一个最大边距
盒子的边距
p{上右下佐顺时针
Margin-top:
Margin-r
Bottom
L
}
上,右,下,左
上下,左右
上,左右,下
Solid 线
dotted点线
Double
……
吴宇信要好好学习HTML https://blog.csdn.net/wuyxinu/article/details/103515157
CSS https://blog.csdn.net/wuyxinu/article/details/103583618
JS https://blog.csdn.net/wuyxinu/article/details/103642800
JS-下 https://blog.csdn.net/wuyxinu/article/details/103646041
还有jQuery的 https://blog.csdn.net/wuyxinu/article/details/103669718
Node.js + Gulp 知识点汇总 https://blog.csdn.net/wuyxinu/article/details/103774211