<h3><i class="iconfont icon-bianji"></i> 使用方法:</h3>
<h4>1、head引入css文件</h4>
<pre class="brush:html">
<link rel="stylesheet" href="css/style.css"/>
</pre>
<h4>2、head引入js文件</h4>
<pre class="brush:html">
<script src="js/jquery.min.js"></script>
</pre>
<h4>3、body引入部分</h4>
<pre class="brush:html">
<div class="dowebok">
<div class="options">
<div class="option active" style="--optionBackground:url(../images/1.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-walking"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/2.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-snowflake"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/3.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-tree"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/4.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-tint"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/5.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-sun"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
</div>
<div class="dowebok">
<div class="options">
<div class="option active" style="--optionBackground:url(../images/1.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-walking"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/2.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-snowflake"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/3.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-tree"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/4.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-tint"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
<div class="option" style="--optionBackground:url(../images/5.jpg);">
<div class="shadow"></div>
<div class="label">
<div class="icon"> <i class="fas fa-sun"></i> </div>
<div class="info">
<div class="main">这是标题</div>
<div class="sub">这是一段描述</div>
</div>
</div>
</div>
</div>
</div>
<script >
$(".option").click(function () {
$(".option").removeClass("active");
$(this).addClass("active");
});
</script>/div>
<script >
$(".option").click(function () {
$(".option").removeClass("active");
$(this).addClass("active");
});
</script>
</pre>