如何用服务器建设网站,网站建设 psd,中信建设有限责任公司,什么求职网站可以做几份简历flask_知识点3_css样式1高度和宽度2行内和块级3字体和颜色4文字对齐方式5浮动6 内边距6 外边距#xff01;css重点1、css样式2、分析页面布局3、参考别人的成果css引用方式1 在标签上#xff08;不建议使用#xff09;// An highlighted block
var foo bar;2 在head标签中写…
flask_知识点3_css样式1高度和宽度2行内和块级3字体和颜色4文字对齐方式5浮动6 内边距6 外边距css重点1、css样式2、分析页面布局3、参考别人的成果css引用方式1 在标签上不建议使用// An highlighted block
var foo bar;2 在head标签中写style标签针对一个页面建议使用
// An highlighted block
var foo bar;3 写在文件中针对多个页面建议使用
// An highlighted block
var foo bar;选择器类选择器 (用的多)、标签选择器、后代选择器、 1 ID选择器
#c1{color:red;
}div idc1/div2 类选择器 (用的多)
.c1{color:gold;
}div classc1/div3 标签选择器
div{color:gold;
}divxx/div4 属性选择器 5 后代选择器
.yy li{color:gold;
}
.yy a{color:gold;
}
div calssyya百度/alia/lilib/li
/div多个样式和覆盖
样式
1高度和宽度 style.c1{height:300px;width:300px;}/style#宽度支持百分比 #行内标签 不行块级标签可以
2行内和块级 style.c1{display: inline-block;height: 100px;width: 300px;border: 1px solid red;}/style3字体和颜色 style.c1{cokor:red;font-size:58px;font-weight:200;font-family: Georgia, serif;}/style4文字对齐方式 style.c1{display: inline-block;height: 100px;width: 300px;border: 1px solid red;text-align:center;/*水平方向居中*/line-height:59px;/*垂直方向居中*/}/style5浮动
!DOCTYPE html
html langen
headmeta charsetUTF-8titleTitle/titlestyle.item{float:left;height: 170px;width: 280px;border: 1px solid red;}/style
/head
bodydivdiv classitem左边/divdiv classitem左边/divdiv classitem左边/divdiv classitem左边/divdiv classitem左边/divdiv styleclear:both右边/div //删除了后面的东西会出去/div
div 你好呀/div
/body
/html6 内边距
!DOCTYPE html
html langen
headmeta charsetUTF-8titleTitle/titlestyle.outer{float:left;height: 400px;width: 280px;border: 1px solid red;padding:20px 10px 30px 40px;padding-top:20px;padding-left:20px;padding-right:20px;}/style
/head
bodydiv classouterdiv stylebackground-color: gold听妈妈的话/divdiv胜多负少/div/div
/body
/html
6 外边距
!DOCTYPE html
html langen
headmeta charsetUTF-8titleTitle/title
/head
bodydiv classouterdiv styleheight:200px;background-color: gold听妈妈的话/divdiv styleheight:100px;background-color: red;margin-top:20px听妈妈的话/div/div
/body
/htmlcss重点
1、css样式
高度、宽度、块级/行内/块级行内、浮动、字体、文字对齐方式、内边距、外边距关于边距-body-区域居中消去body标签的默认边距 body{margin: 0;}文本居中 div stylewidth:200px; background-color:pink; text-align:center文本局中/div区域居中 自己要有宽度margin-left:auto;margin-right:auto; .c1{width:980px;background-color:pink;height:100px;margin: 0 auto; !-- 居中对齐 auto左右自动居中 --}div classc1左边/div父亲没有高度、宽度被孩子支撑起来 如果浮动存在一定记得加入浮动兄弟结点的最后 div styleclear:both/div //删除了后面的东西会出去2、分析页面布局
根据你看到的页面把他们划分为很多小的区域再自己去填充样式。
3、参考别人的成果