Html
    Css
    Js
.cateUL {
	display:block;
	overflow:hidden;
}
.cateUL li {
	padding:15px 20px;
	overflow:hidden;
	border-top:1px solid #ddd;
	position:relative;
}
.cateUL li span {
	top:27px;
	position:absolute;
	left:0;
	width:40px;
	height:30px;
	background:url(http://www.jq22.com/tp/6369385894169696755656026.png) no-repeat left top/20px;
}
.cateUL li span.likeSpanS {
	background:url(http://www.jq22.com/tp/6369385894552510354252951.png) no-repeat left top/20px;
}
.cateUL li a {
	margin-left:40px;
	overflow:hidden;
}
.cateUL li h3 {
	font-size:14px;
	color:#333;
	font-weight:normal;
	line-height:24px;
	float:left;
	margin-left:20px;
	width:calc(100% - 80px);
}
.cateUL li a>img {
	width:60px;
	float:right;
}
.likeHidden {
	position:fixed;
	width:100%;
	height:50px;
	left:0;
	top:50%;
	z-index:999;
	margin-top:-25px;
	text-align:center;
	overflow:hidden;
	display:none;
}
.likeHidden h3 {
	display:inline-block;
	color:#fff;
	background:rgba(0,0,0,0.4);
	font-size:14px;
	line-height:50px;
	padding:0 30px;
	border-radius:3px;
	letter-spacing:4px;
	font-weight:normal;
}

                        
↑上面代码改变,会自动显示代码结果 jQuery调用版本:1.11.3
 立即下载

添加收藏,取消收藏(原创)

简单的添加收藏和取消收藏效果

0