大数据研发基本之CSS基本知识
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">做为</span>大数据<span style="color: black;">研发</span><span style="color: black;">基本</span>的一部分,CSS:层叠样式表,是英文Cascading Style Sheets的首字母缩写,是一种用来表现HTML或XML等文件样式的计算机语言,<span style="color: black;">亦</span>是一种标记语言。<span style="color: black;">重点</span>是<span style="color: black;">帮忙</span>美化网页,布局页面,CSS不仅<span style="color: black;">能够</span>静态地修饰网页,还能<span style="color: black;">协同</span><span style="color: black;">各样</span>脚本语言动态地对网页各元素进行格式化。CSS <span style="color: black;">重点</span>用于设置 HTML 页面中的文本内容(字体、<span style="color: black;">体积</span>、对齐方式等)、<span style="color: black;">照片</span>的外形(宽高、边框样式、边距等)以及版面的布局和外观<span style="color: black;">表示</span>样式。</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic3.zhimg.com/80/v2-56177eb7ca60474fbfafcad16837911a_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">1、</span><span style="color: black;">基本</span>知识</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS特点:丰富的样式定义、易于<span style="color: black;">运用</span>和修改、多页面应用、层叠、页面压缩。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS的引用方式:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(1)行内样式:<span style="color: black;">运用</span>style属性,只是对当前标签有效,页面内容和样式高度吻合的</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><p style="color: red">Hello world.</p></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(2)内部样式:在head中<span style="color: black;">运用</span>style标签,当前页面有效,内容和样式<span style="color: black;">必定</span>程度分离,<span style="color: black;">然则</span>不彻底。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><style></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">div {</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">color: red;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">font-size: 12px;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"></style></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">(3)<span style="color: black;">外边</span>样式:将样式写到一个单独CSS文件中,<span style="color: black;">必须</span>用到HTML文件,引用它<span style="color: black;">就可</span>,实现了内容与样式的完全分离。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><link href="mystyle.css" rel="stylesheet" type="text/css"/></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS的颜色:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">color 属性用于定义文本的颜色。例如:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">div {</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">color: red;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS中颜色的<span style="color: black;">暗示</span><span style="color: black;">办法</span></p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1.预定义的颜色值 red,green,blue……等</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2.十六进制 #FF0000、#FF6600等(</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3.RGB代码 rgb(255,0,0)或rgb(100%,0%,0%</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">4.RGBA:是在原有RGB上添加了透明底,alpha</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">5.HSL:用色调、饱和度和明度3个分量<span style="color: black;">暗示</span>颜色</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">6.HSLA:在HSL上添加了透明度</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic3.zhimg.com/80/v2-df0c7f88ebe7c4d12a4e5b632ab74d4e_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">2、</span><span style="color: black;">基本</span>语法</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS和HTML<span style="color: black;">同样</span>都是浏览器能解析的计算机语言,<span style="color: black;">因此呢</span>CSS<span style="color: black;">亦</span>有自己的语法结构;</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS 规则由三个<span style="color: black;">重点</span>的部分<span style="color: black;">形成</span>:</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1. <span style="color: black;">选取</span>器,以及一条或多条声明,但值得<span style="color: black;">重视</span>的是声明<span style="color: black;">必要</span>要放在大括号内{ }。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2. 每条声明由一个属性和值<span style="color: black;">构成</span>,属性和值用冒号<span style="color: black;">掰开</span>,每条语句以英文的分好结尾。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">selector {declaration1; declaration2; ... declarationN }</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">Selector是<span style="color: black;">选取</span>符,最<span style="color: black;">平常</span>的<span style="color: black;">选取</span>符是HTML标签;property是<span style="color: black;">选取</span>符的属性,Value是<span style="color: black;">选取</span>符的属性值。(<span style="color: black;">重视</span>:多个<span style="color: black;">选取</span>符用分号隔开)</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">例子:h1 {color:yellow; font-size:16px;}</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">h1是<span style="color: black;">选取</span>器;color和font-size是属性;16px则是属性值。</p>
<div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic1.zhimg.com/80/v2-9087bf676ed31a6bb5116a9a5b0bfedc_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">以上<span style="color: black;">便是</span>CSS的<span style="color: black;">基本</span>知识和语法,CSS是大数据<span style="color: black;">研发</span><span style="color: black;">基本</span>的<span style="color: black;">要紧</span>一环,与HTML相辅相成,能够使网页的制作更加美观大方,令人赏心悦目。多加实操练习,<span style="color: black;">才可</span>够促进自己进步。</p>
<p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">倘若</span>你是前端小白<span style="color: black;">或</span>打算转行进入前端这个行业,不<span style="color: black;">晓得</span><span style="color: black;">将来</span>该怎么学习,都<span style="color: black;">能够</span>加入我组建的自学团,<span style="color: black;">每日</span><span style="color: black;">一块</span>打卡学习,分享学习资料,<span style="color: black;">定时</span>组织实战项目,匹配学习伙伴,我会严格监督你们的。</p>
楼主果然英明!不得不赞美你一下!
页:
[1]