f9yx0du 发表于 2024-6-29 19:13:42

Web前端之CSS


    <h2 style="color: black; text-align: left; margin-bottom: 10px;">第1章,CSS简介</h2>
    <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>场景<span style="color: black;">便是</span>美化网页,布局页面。</p>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">1,HTML的局限性</h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">说起HTML,这其实是个非常单纯的家伙,它只关注内容的语义。<span style="color: black;">例如</span>&lt;h1&gt;表面这是一个大标题,&lt;p&gt;<span style="color: black;">显示</span>这是一个段落,&lt;img&gt;<span style="color: black;">显示</span>这儿有一个<span style="color: black;">照片</span>,&lt;a&gt;<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>的特点:丑。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">虽然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://pic1.zhimg.com/80/v2-ac681ab26653257a37e3018045f66b2c_720w.webp" style="width: 50%; margin-bottom: 20px;"></div>
    <h2 style="color: black; text-align: left; margin-bottom: 10px;">2,CSS:网页的美容师</h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS是层叠样式表(Cascading Style Sheets)的简<span style="color: black;">叫作</span>,有时<span style="color: black;">亦</span><span style="color: black;">叫作</span>为CSS样式表或级联样式表。</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic2.zhimg.com/80/v2-b6b5b6eaffaa9c8f74a16ce27be7f625_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;">CSS<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>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">CSS让<span style="color: black;">咱们</span>的网页更加丰富多彩,布局更加灵活自如。简单理解:CSS<span style="color: black;">能够</span>美化HTML,让HTML更<span style="color: black;">美丽</span>,让页面布局更简单。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">总结:</p>HTML<span style="color: black;">重点</span>做结构,<span style="color: black;">表示</span>元素内容;CSS美化HTML,布局网页;CSS最大价值:由HTML专注去做结构呈现,样式交给CSS,即结构(HTML)与样式(CSS)相分离。<h2 style="color: black; text-align: left; margin-bottom: 10px;">3,CSS语法规范</h2>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;"><span style="color: black;">运用</span>HTML时,<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>地<span style="color: black;">运用</span>CSS对网页进行修饰,<span style="color: black;">首要</span><span style="color: black;">必须</span><span style="color: black;">认识</span>CSS样式规则。</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>:<span style="color: black;">选取</span>器以及一条或多条声明。</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><img src="https://pic1.zhimg.com/80/v2-567dac1d84e5c4bf8738c74f61dc423c_720w.webp" style="width: 50%; margin-bottom: 20px;"></div><span style="color: black;">选取</span>器是用于指定CSS样式的HTML标签,花括号内是对该对象设置的<span style="color: black;">详细</span>样式;属性和属性值以“键值对”的形式<span style="color: black;">显现</span>;属性是对指定的对象设置的样式属性,例如字体<span style="color: black;">体积</span>、文本颜色等;属性和属性值之间用英文“:”<span style="color: black;">掰开</span>;多个“键值对”之间用英文“;”进行区分。<h2 style="color: black; text-align: left; margin-bottom: 10px;">4,CSS代码风格</h2>
    <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>书写方式。</p>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">1,样式格式书写</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">/* <span style="color: black;">第1</span>种:紧凑格式 */</span>
      <span style="color: black;">h3</span> <span style="color: black;">{</span><span style="color: black;">color</span><span style="color: black;">:</span> <span style="color: black;">red</span><span style="color: black;">;</span> <span style="color: black;">font-size</span><span style="color: black;">:</span> <span style="color: black;">20</span><span style="color: black;">px</span><span style="color: black;">;}</span>

      <span style="color: black;">/* 第二种:展开格式,<span style="color: black;">剧烈</span><span style="color: black;">举荐</span>第二种格式,<span style="color: black;">由于</span>更直观 */</span>
      <span style="color: black;">h3</span> <span style="color: black;">{</span>
      <span style="color: black;">color</span><span style="color: black;">:</span> <span style="color: black;">red</span><span style="color: black;">;</span>
      <span style="color: black;">font-size</span><span style="color: black;">:</span> <span style="color: black;">20</span><span style="color: black;">px</span><span style="color: black;">;</span>
      <span style="color: black;">}</span>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">2,样式<span style="color: black;">体积</span>写</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">/* <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>
      <span style="color: black;">h3</span> <span style="color: black;">{</span>
      <span style="color: black;">color</span><span style="color: black;">:</span> <span style="color: black;">red</span><span style="color: black;">;</span>
      <span style="color: black;">}</span>

      <span style="color: black;">h3</span> <span style="color: black;">{</span>
      <span style="color: black;">COLOR</span><span style="color: black;">:</span> <span style="color: black;">RED</span><span style="color: black;">;</span>
      <span style="color: black;">}</span>
    </div>
    <p style="font-size: 16px; color: black; line-height: 40px; text-align: left; margin-bottom: 15px;">3,空格规范</p>
    <div style="color: black; text-align: left; margin-bottom: 10px;"><span style="color: black;">/* 1, 属性值前面,冒号后面,<span style="color: black;">保存</span>一个空格 */</span>
      <span style="color: black;">/* 2, <span style="color: black;">选取</span>器(标签)和大括号中间<span style="color: black;">保存</span>空格 */</span>
      <span style="color: black;">h3</span> <span style="color: black;">{</span>
      <span style="color: black;">co</span>
    </div>




wrjc1hod 发表于 2024-9-29 23:15:53

外链发布论坛学习网络优化SEO。

b1gc8v 发表于 2024-10-24 19:18:42

期待与你深入交流,共探知识的无穷魅力。
页: [1]
查看完整版本: Web前端之CSS