css设置以某个字符开头或包含某个字符的类名样式

  [class^='icon'],
  [class*=' icon'] {
    width: 100px;
    height: 100px;
    background-color: red;
  }

以icon开头,包含 ' icon'的类名

posted @ 2021-09-25 19:32  吴小明-  阅读(662)  评论(0编辑  收藏  举报