📜  CSS语法

📅  最后修改于: 2020-11-04 02:08:15             🧑  作者: Mango

CSS语法

CSS规则集包含一个选择器和一个声明块。

选择器:选择器指示要设置样式的HTML元素。它可以是任何类似的标签

等等。</ html></p> <p>声明块:声明块可以包含一个或多个用分号分隔的声明。对于上面的示例,有两个声明:</p> <ul> <li>颜色:黄色;</li> <li>字体大小:11像素;</li> </ul> <p>每个声明均包含属性名称和值,并用冒号分隔。</p> <p>属性:属性是HTML元素的一种属性。可能是颜色,边框等。</p> <p>值:将值分配给CSS属性。在上面的示例中,值“ yellow”被分配给color属性。</p> <div class="hcb_wrap"> <pre class="prism line-numbers lang-python" data-lang="Java"><code><span span="" style="font-size: 10pt;">Selector{Property1: value1; Property2: value2; ..........;} </span></code></pre> </div> </div> </div> </div> </div> </div> <footer> <div class="bg-white text-center pb-1"> <p class="text-body-tertiary pt-3 lh-lg text-opacity-50" id="footer-text">Copyright © 2020 - 2024 版权所有 <br> <a href="https://beian.miit.gov.cn/" target="_blank" class="text-opacity-50 text-body-tertiary mt-1 mb-1">蜀ICP备20006366号-1</a> <br> Made with ❤️ in Chengdu </p> </div> </footer> <!-- 引入Bootstrap JavaScript库 --> <script src="https://unpkg.com/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script> <!-- 引入Meilisearch搜索相关的JavaScript库 --> <script src="https://cdn.jsdelivr.net/npm/@meilisearch/instant-meilisearch/dist/instant-meilisearch.umd.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/instantsearch.js@4"></script> <script src="https://imangodoc.com/static/javascript/meili_custom.js"></script> <!-- 引入prismjs代码高亮相关的JavaScript库 --> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/components/prism-core.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/toolbar/prism-toolbar.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/autoloader/prism-autoloader.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/prismjs@1.29.0/plugins/copy-to-clipboard/prism-copy-to-clipboard.min.js"></script> </body> </html>