首页 > 其他分享 >CSS Case Insensitive Attribute Selector All In One

CSS Case Insensitive Attribute Selector All In One

时间:2024-07-17 15:29:34浏览次数:10  
标签:Case case insensitive Attribute sensitive Insensitive class CSS

CSS Case Insensitive Attribute Selector All In One

CSS 大小写敏感的属性选择器

/* case sensitive, only matches "case_sensitive" */
[class=case_sensitive] {
  background: pink;
}

Adding a space before the i flag to the attribute selector brackets will make the attribute value search case insensitive.

/* case insensitive, matches "case_insensitive", "Case_insensitive", etc. */
[class=case_insensitive i] {
  background: lightblue;
}

demos

<!DOCTYPE html>
<html lang="zh-Hans">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="author" content="xgqfrms">
  <meta name="generator" content="VS code">
  <title>CSS case sensitive vs CSS case insensitive</title>
  <style lang="css">
    /* case sensitive, only matches "case_sensitive" */
    [class=case_sensitive] {
      background: pink;
    }

    /* case insensitive, matches "case_insensitive", "Case_insensitive", etc. */
    [class=case_insensitive i] {
      background: lightblue;
    }
    .error {
      color: red;
    }
    .success {
      color: green;
    }
  </style>
</head>
<body>
  <header>
    <h1>CSS case sensitive vs CSS case insensitive</h1>
  </header>
  <main>
    <section>
      <p class="case_sensitive">CSS case sensitive <mark>class="case_sensitive"</mark></p>
      <p class="Case_sensitive error">CSS case sensitive <mark>class="Case_sensitive"</mark></p>
      <hr/>
      <p class="case_insensitive">CSS case insensitive <mark>class="case_insensitive"</mark></p>
      <p class="Case_insensitive success">CSS case insensitive <mark>class="Case_insensitive"</mark></p>
    </section>
    <article></article>
  </main>
  <footer>
    <p>copyright&copy; xgqfrms 2024</p>
  </footer>
  <!-- <script type="module" src="./app.js"></script> -->
</body>
</html>

image

bug

标签:Case,case,insensitive,Attribute,sensitive,Insensitive,class,CSS
From: https://www.cnblogs.com/xgqfrms/p/18306411

相关文章

  • AttributeError: ‘str’ object has no attribute ‘get’
    【Python】成功解决AttributeError:‘str’objecthasnoattribute‘get’在Python编程中,遇到AttributeError是一个常见的错误,它通常表明你尝试访问的对象不具备你正在调用的属性或方法。当错误信息为“AttributeError:‘str’objecthasnoattribute‘get’”时,这......
  • SQL中的case when then else end用法
    Case具有两种格式。简单Case函数和Case搜索函数。1--简单Case函数2CASEsex3WHEN'1'THEN'男'4WHEN'2'THEN'女'5ELSE'其他'END6--Case搜索函数7CASEWHENsex='1'THEN'男'8W......
  • 易优cms网站attribute功能:获取栏目的属性列表,或者单独获取某个属性值-Eyoucms
    attribute栏目属性列表 [基础用法]名称:attribute功能:获取栏目的属性列表,或者单独获取某个属性值。语法:{eyou:attributetype='auto'}  {$attr.name}:{$attr.value}{/eyou:attribute}参数:aid=''文档ID,在arclist标签、list标签之内,以及内容页模板中一般不需要指定aid属性,系统......
  • Java性能优化-switch-case和if-else速度性能对比,到底谁快?
    场景Java中使用JMH(JavaMicrobenchmarkHarness微基准测试框架)进行性能测试和优化:https://blog.csdn.net/BADAO_LIUMANG_QIZHI/article/details/131723751参考以上性能测试工具的使用。下面针对Java中对switch-case和if-else在速度方面的性能做测试。注:博客:https://blog......
  • 深入剖析C++的 “属性“(Attribute specifier sequence)
    引言在阅读开源项目源代码是,发现了一个有趣且特殊的C++特性:属性。属性(attributespecifiersequences)是在C++11标准引入的。在C++11之前,编译器特有的扩展被广泛用来提供额外的代码信息。例如,GNU编译器(GCC)使用__attribute__来控制函数的行为。但是缺点也很明显,那就是这种方......
  • Failed to configure a DataSource: 'url' attribute is not specified and no embe..
    原文链接: https://www.cnblogs.com/javawxid/p/10949511.html问题原因:Mybatis没有找到合适的加载类,其实是大部分spring-datasource-url没有加载成功,分析原因如下所示.DataSourceAutoConfiguration会自动加载.没有配置spring-datasource-url 属性.spring......
  • 处理Keras中的AttributeError: ‘NoneType‘ object has no attribute ‘XYZ‘
    处理Keras中的AttributeError:'NoneType'objecthasnoattribute'XYZ'......
  • Fundamentals of Machine Learning for Predictive Data Analytics Algorithms, Worke
    主要内容:本书介绍了机器学习在预测数据分析中的基本原理、算法、实例和案例研究,涵盖了从数据到决策的整个过程。书中涉及机器学习项目生命周期的各个方面,包括数据准备、特征设计和模型部署。结构:本书分为五个部分,共计14章和若干附录:引言(IntroductiontoMachineLearn......
  • 自动测试脚本----项目文件结构介绍(common,Data,Log,Case)
    一、总体框架介绍我们先看一下一般项目的总体结构: Automation:项目工程文件Common:存放一些封装的公共函数,可在已添加的py文件中追加函数和类,也可新增py文件和包来新增公共函数。新增包时请注意不要新增文件夹,新增文件夹的话,在文件夹下新增的py文件无法import,能impor......
  • 【Abaqus Case】2D弹塑性接触分析
    2D弹塑性-接触分析本案例属于材料非线性+边界条件非线性问题描述前处理材料*Material,name=steel*Density7.8e-09,*Elastic210000.,0.3*Plastic1220.,0.2440.,1.网格划分CPS4I单元(平面应力4节点四边形双线性非协调单元),涉及到接触分析,因此从面网格要......