首页 > 解决方案 > 如何使用 :after 选择器通过 jQuery 更改背景颜色?

问题描述

如何使用 jQuery 更改弹出字母的背景颜色?

.map-button a.active:after {
  content: '';
  width: 20px;
  height: 20px;
  display: inline-block;
  border: 2px solid #000;
  background-color: #FFF;
  border-radius: 50%;
  margin-top: 2px;
}
<div class="map-button">
  <a href="#" data-id="0900" title="A">
    <span class="sr-only">A</span>
  </a>
</div>

标签: jquery

解决方案


推荐阅读