小编Usm*_*had的帖子

为什么::在伪元素之前不能使用:visited伪类?

我正在尝试使用伪类和伪元素来设置元素的样式.喜欢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)

html css jquery html5 css3

22
推荐指数
3
解决办法
1341
查看次数

是否可以在网页中从上到下依次加载图像?

我想从上到下依次加载图像,例如查看附加图像。

在此处输入图片说明

  • 第一次加载:图像 01
  • 当完全加载图像 01 然后加载图像 02,
  • 当完全加载图像 02 然后加载图像 03 等等...

.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)

html css jquery webpage image

4
推荐指数
1
解决办法
1940
查看次数

标签 统计

css ×2

html ×2

jquery ×2

css3 ×1

html5 ×1

image ×1

webpage ×1