侧面固定导航栏 以及 伪类/伪元素的使用

侧面固定导航栏

在这里插入图片描述

<div id="tool">
	<span></span>
	<div class="btn">
		<a href="" class="c4 active">爱逛 好货</a>
		<a href="" class="c5">好店 直播</a>
		<a href="" class="c6">品质 特色</a>
		<a href="" class="c7">实惠 热卖</a>
		<a href="" class="c4">猜你 喜欢</a>
		<a href="" class="item6">反馈</a>
		<a href="" class="">暴恐 举报</a>
	</div>


#tool {
	width: 50px;
	height: 350px;
	position: fixed;
	right: 3%;
	top: 100px;
	
}
#tool span{
	display: block;
	background-image: url(images/logo.png);
	width: 24px;
	height: 24px;
	background-repeat: no-repeat;
	position: absolute;
	top:-24px;
	left: 13px;


}

#tool div{
	height: 350px;
	border-radius: 8px;
	overflow: hidden;
}

#tool a{
	display: block;
	width: 50px;
	height: 50px;
	text-align: center;
	background: #fff;
	word-break: keep-all;/*空格为限,强制换行*/
	padding-top: 6px;
	box-sizing: border-box;
	position: relative;
}

#tool a:after{/*一个冒号为伪类,两个冒号为伪元素,IE8没有双冒号语法
*/
	content: '';
	border-bottom: 1px solid #efefef;
	width: 34px;
	position: absolute;
	left: 8px;
	bottom: 0;
}

.item6{
	line-height: 38px;
}

#tool a:hover ,#tool a.active{
	background: linear-gradient(135deg,#ff9000,#ff5000);/*第一个参数是角度*/
	color: #fff;
	font-weight: bold;

}
#tool a:hover:after,#tool a.active:after{
	border: none;
}


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值