I wanted to know if there's a way to add content at the end of my div which is partially hidden.
.wrapper {
overflow: hidden;
width: 200px;
height: 30px;
margin-top: 10px;
}
.slide {
position: absolute;
left: -180px;
width: 200px;
height: 30px;
transition: 1s;
text-align: center;
}
.wrapper:hover .slide {
transition: 1s;
left: 0;
}
<div class="wrapper">
<p class="slide" style="background-color:red;">
test
</p>
</div>
<div class="wrapper">
<p class="slide" style="background-color:blue;">
test
</p>
</div>
<div class="wrapper">
<p class="slide" style="background-color:yellow;">
test
</p>
</div>
<div class="wrapper">
<p class="slide" style="background-color:green;">
test
</p>
</div>
The thing is simple. It's a menu with 4 links. It's partially hidden, but on hover it's completely revealed. I wanted to add a little arrow on the visible part of the div. Is there a way to make it ? I already try this :
.slide:after {
content: ' >';
}
Sure this works but I think there's a better way !