我在一个div内有两个div,宽度为100%。一格的宽度为70%,另一格的宽度为30%。我正在尝试做的是当链接处于活动状态时30%的div具有向左箭头**。
在这里您可以看到一些有关我的代码以及设计所在位置的图像。
.menu a.active:before {
content: "";
position: absolute;
top: 50%;
left: -21px;
z-index: -1;
height: 30px;
width: 30px;
margin-top: -15px;
background: #FFF;
transform: rotate(45deg);
-ms-transform: rotate(45deg);
-webkit-transform: rotate(45deg);
border-opacity: 0.3;
border-left: 5px solid rgba(0, 0, 0, .3);
border-bottom: 5px solid rgba(0, 0, 0, .3);
-webkit-background-clip: padding-box;
/* for Safari */
background-clip: padding-box;
/* for IE9+, Firefox 4+, Opera, Chrome */
}
.menu a.active {
position: relative;
background: #FFF;
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
/* width: 250px; */
/* height: 250px; */
/* padding:5px; */
z-index: 1;
border-opacity: 0.3;
/* border: 5px solid rgba(0, 0, 0, .3); */
-webkit-background-clip: padding-box;
/* for Safari */
background-clip: padding-box;
/* for IE9+, Firefox 4+, Opera, Chrome */
}
<div id="featured">
<!--div with width 70%-->
<div class="fragments-together ">
<div class="slider">
<div class="box overlay-image-up">
<span class="top-title">Upcoming events</span>
<span>
<img class="slider-homepage" src="./img/slider-home-page.png"/>
</span>
<div class="info">
<div class="info-left">
<span>17 January 2020</span>
<h1>European youth gathered in Buzau at the end of the year</h1>
</div>
<div class="info-right">
<button>see more</button>
</div>
</div>
</div>
<div class="box overlay-image-up">
<span class="top-title">Upcoming events</span>
<span>
<img class="slider-homepage" src="./img/slider-home-page.png"/>
</span>
<div class="info">
<div class="info-left">
<span>17 January 2020</span>
<h1>European youth gathered in Buzau at the end of the year</h1>
</div>
<div class="info-right">
<button>see more</button>
</div>
</div>
</div>
<div class="box overlay-image-up">
<span class="top-title">Upcoming events</span>
<span>
<img class="slider-homepage" src="./img/slider-home-page.png"/>
</span>
<div class="info">
<div class="info-left">
<span>17 January 2020</span>
<h1>European youth gathered in Buzau at the end of the year</h1>
</div>
<div class="info-right">
<button>see more</button>
</div>
</div>
</div>
<div class="box overlay-image-up">
<span class="top-title">Upcoming events</span>
<span>
<img class="slider-homepage" src="./img/slider-home-page.png"/>
</span>
<div class="info">
<div class="info-left">
<span>17 January 2020</span>
<h1>European youth gathered in Buzau at the end of the year</h1>
</div>
<div class="info-right">
<button>see more</button>
</div>
</div>
</div>
</div>
<div class="overlay-slider"></div>
</div>
<ul class="ui-tabs-nav">
<div class="menu">
<a href="#" data-picindex="1">
<span><img src="./img/cube-icon.png" alt="">21 Feb 2019</span>
<h2>Lorem ipsum dolor sit amet consectetur adipiscing elit, sed do eiusmod </h2>
</a>
<a href="#" data-picindex="2">
<span><img src="./img/cube-icon.png" alt="">21 Feb 2019</span>
<h2>European youth gathered in Buzau at the end of the year</h2>
</a>
<a href="#" data-picindex="3">
<span><img src="./img/cube-icon.png" alt="">21 Feb 2019</span>
<h2>Lorem ipsum dolor sit amet consectetur adipiscing elit, sed do eiusmod </h2>
</a>
<a href="#" data-picindex="4">
<span><img src="./img/cube-icon.png" alt="">21 Feb 2019</span>
<h2>Lorem ipsum dolor sit amet consectetur adipiscing elit, sed do eiusmod </h2>
</a>
</div>
</ul>
</div>
我可以在div中添加箭头吗?我正在使用滑块,这是一个滑块。
谢谢您的时间!