::selection选择器

<style type="text/css">
    .selectColor::selection{color:#fff;background:pink;cursor: }
</style>

<body>
  <p>普通文本,不设置::selection,选中是文本的颜色为白色,背景为蓝色</p>
  <p class="selectColor">选中的文本的颜色为白色,背景为粉色</p>
</body>

 

相关文章:

  • 2021-12-31
  • 2021-05-20
  • 2021-11-03
  • 2021-12-28
  • 2021-09-09
猜你喜欢
  • 2021-11-27
  • 2021-12-01
  • 2022-12-23
  • 2021-12-28
  • 2022-01-02
  • 2022-12-23
  • 2021-12-28
相关资源
相似解决方案