gpt4 book ai didi

html - 如何将菜单文本指向右侧并使悬停链接位于左侧

转载 作者:太空宇宙 更新时间:2023-11-04 02:14:07 25 4
gpt4 key购买 nike

我有 couponia coupons online shop template显示简单页面的脚本。

菜单链接文本指向,当悬停上方时,它会稍微向右移动。像那样:

enter image description here

我想要对立面,我希望文本链接指向右边,链接悬停在左边。像那样:

enter image description here

这是相关的 HTML 代码:

       <div class="col-md-3">
<aside class="sidebar-left">
<h3 class="mb20">I am Looking For</h3>
<ul class="nav nav-tabs nav-stacked nav-coupon-category nav-coupon-category-left">
<li><a href="#"><i class="fa fa-cutlery"></i>Food & Drink<span>40</span></a>
</li>
<li><a href="#"><i class="fa fa-calendar"></i>Events</a>
</li>
<li><a href="#"><i class="fa fa-female"></i>Beauty</a>
</li>
<li><a href="#"><i class="fa fa-bolt"></i>Fitness</a>
</li>
<li><a href="#"><i class="fa fa-headphones"></i>Electronics</a>
</li>
<li><a href="#"><i class="fa fa-image"></i>Furniture</a>
</li>
<li><a href="#"><i class="fa fa-umbrella"></i>Fashion</a>
</li>
<li><a href="#"><i class="fa fa-shopping-cart"></i>Shopping</a>
</li>
<li><a href="#"><i class="fa fa-home"></i>Home & Graden</a>
</li>
<li><a href="#"><i class="fa fa-plane"></i>Travel</a>
</li>
</ul>
</aside>
</div>

这是 CSS 代码:

.nav-tabs.nav-stacked.nav-coupon-category {
margin-bottom: 30px;
-webkit-box-shadow: 0 3px 1px rgba(0,0,0,0.15);
box-shadow: 0 3px 1px rgba(0,0,0,0.15);
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a {
text-transform: uppercase;
font-size: 13px;
z-index: 1;
-webkit-border-radius: 0;
border-radius: 0;
background: #fff;
border-left: none;
border-right: none;
border: none;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
-ms-transition: 0.2s;
transition: 0.2s;
height: 40px;
line-height: 40px;
padding: 0px 0px 0px 55px;
position: relative;
margin: 0;
color: #666;
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a .fa {
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
font-size: 18px;
position: absolute;
display: block;
width: 40px;
height: 40px;
background: #fbfbfb;
top: 0;
left: 0;
text-align: center;
line-height: 40px;
border-right: 1px solid #ededed;
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a .fa:before {
opacity: 0.65;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=65)";
filter: alpha(opacity=65);
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a span {
margin-left: 10px;
color: #bfbfbf;
padding: 1px 7px;
-webkit-border-radius: 2px;
border-radius: 2px;
font-size: 10px;
-webkit-transition: 0.2s;
-moz-transition: 0.2s;
-o-transition: 0.2s;
-ms-transition: 0.2s;
transition: 0.2s;
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a:hover {
background: #fbfbfb;
padding-left: 65px;
color: #2a8fbd;
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a:hover .fa {
background: #2a8fbd;
color: #fff;
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a:hover .fa:before {
opacity: 1;
-ms-filter: none;
filter: none;
}
.nav-tabs.nav-stacked.nav-coupon-category > li > a:hover span {
background: #2a8fbd;
color: #fff;
}
.nav-tabs.nav-stacked.nav-coupon-category > li:first-child a {
border-top: none;
}
.nav-tabs.nav-stacked.nav-coupon-category > li:last-child a {
border-bottom: none;
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a {
z-index: 2;
background: #2a8fbd;
color: #fff;
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a span {
color: #fff;
background: rgba(0,0,0,0.5);
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a .fa {
background: #298dba;
color: #fff;
border-right: 1px solid #2681aa;
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a .fa:before {
opacity: 1;
-ms-filter: none;
filter: none;
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a:hover {
background: #2a8fbd;
color: #fff;
padding-left: 55px;
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a:hover span {
background: rgba(0,0,0,0.5);
}
.nav-tabs.nav-stacked.nav-coupon-category > .active > a:before {
content: '';
position: absolute;
height: 28px;
width: 28px;
top: 6px;
right: -15px;
background: #2a8fbd;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-o-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
display: block;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right {
margin-right: 0;
margin-left: 30px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right > li > a {
padding: 0px 0px 0px 20px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right > li > a [class^="fa fa-"] {
left: auto;
right: 0;
border-left: 1px solid #ededed;
border-right: none;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right > li > a:hover {
padding-left: 35px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right > .active > a [class^="fa fa-"] {
border-left: 1px solid #2681aa;
border-right: none;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right > .active > a:before {
right: auto;
left: -15px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-right > .active > a:hover {
padding-left: 20px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-inline {
-webkit-box-shadow: none;
box-shadow: none;
margin: 0;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-inline > li {
-webkit-box-shadow: 0 1px 0 rgba(0,0,0,0.15);
box-shadow: 0 1px 0 rgba(0,0,0,0.15);
float: left;
display: block;
margin-right: 10px;
margin-bottom: 10px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-inline > li > a {
border-bottom: none !important;
padding-right: 15px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-inline > li > a:hover {
padding-left: 55px;
}
.nav-tabs.nav-stacked.nav-coupon-category.nav-coupon-category-inline > li.active > a:before {
display: none;
}

在这里查看完整的 css 文件:

Styles.css

Bootstrap.css

直播一个可以看到: Here

它使用 Bootstarp,我尝试使用 CSS 但没有成功。任何想法如何执行?

最佳答案

尝试使用

<div class="col-md-3" dir="rtl">

关于html - 如何将菜单文本指向右侧并使悬停链接位于左侧,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39193962/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com