我正在尝试使用伪类和伪元素来设置元素的样式.喜欢hover::before工作完美,但:visited::before不工作.

如果链接被访问但我:visited::before没有工作,我想显示"看到" .
*, *:before, *:after {
box-sizing: border-box;
}
body {
background-color: #eee;
font-size: 23px;
padding: 50px;
font-family: 'Ubuntu Condensed', sans-serif;
}
.style-3 {
margin: 20px;
float: left;
padding: 20px 80px 20px 20px;
border: 1px solid #ccc;
background-color: #fff;
position: relative;
text-decoration: none;
}
.style-3 {
color: green;
}
.style-3:visited {
color: red;
}
.style-3:hover::before {
content: "Hover";
position: absolute;
right: 20px;
color: yellow;
}
.style-3:visited::before {
content: "Seen";
position: absolute;
right: 20px; …Run Code Online (Sandbox Code Playgroud)我想从上到下依次加载图像,例如查看附加图像。
.my-container {
width: 1060px;
margin: 0 auto;
padding: 50px;
}
img {
margin: 0 auto 35px;
display: block;
width: 100%;
max-width: 100%;
}Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="my-container">
<div class="portfolio">
<img alt="image 01" width="960" height="640" src="http://i.imgur.com/wIfbFMu.jpg">
<img alt="image 02" width="960" height="640" src="http://i.imgur.com/thiOajQ.jpg">
<img alt="image 03" width="960" height="720" src="http://i.imgur.com/YgIxbVF.jpg">
<img alt="image 04" width="960" height="640" src="http://i.imgur.com/Xt6R20O.jpg">
<img alt="image 05" width="960" height="625" src="http://i.imgur.com/XENpTvq.jpg">
<img alt="image 06" width="960" height="638" src="http://i.imgur.com/qBMOAgZ.jpg">
</div>
</div><!-- .my-container …Run Code Online (Sandbox Code Playgroud)