FORK ME

console 命令行工具 X clear

                    
>
console
<h2> 原始图像</h2>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/123941/sports-q-c-1000-600-3.jpg">

<h2><code>透明度(25%)</code> | <code>透明度(70%)</code></h2>
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/123941/sports-q-c-1000-600-3.jpg">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/123941/sports-q-c-1000-600-3.jpg">
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  text-align: center;
  margin: 20px auto;
  font-family: 'Roboto';
}

h2 {
  margin: 20px;
  padding-top: 20px;
  clear: both;
}

img {
  max-width: 50%;
  margin: 0 auto;
  padding: 2px;
}

img:nth-of-type(1) {
  max-width: 50%;
}

img:nth-of-type(2) {
  -webkit-filter: opacity(25%);
  filter: opacity(25%);
}

img:nth-of-type(3) {
  -webkit-filter: opacity(70%);
  filter: opacity(70%);
}