|
|

楼主 |
发表于 2022-4-2 12:34
|
显示全部楼层
帖子还是为了进一步演示用伪元素做帖子的教程,帖子代码如下:
- <style type="text/css">
- .outwin {
- width: 1201px;
- height: 799px;
- background: gray url('/data/attachment/forum/202204/02/121501av7i41aw7t7usues.jpg');
- position: relative;
- opacity: .85;
- }
- .outwin::before {
- content: '';
- width: 80%;
- height: 80%;
- position: absolute;
- background: transparent url('/data/attachment/forum/202204/02/082246n566q71e3o7nwev3.gif');
- filter: blur(5px);
- }
- .outwin::after {
- content: attr(data-hh);
- position: absolute;
- right: 10px;
- top: 10px;
- color: transparent;
- font: bold 3em Sans-serif;
- writing-mode: vertical-lr;
- text-shadow: 2px 2px 3px #D5BF77;
- }
- </style>
- <div class="outwin" data-hh="窗外"></div>
- <script language="javascript">
- let yyy = document.createElement('iframe');
- yyy.src = 'https://music.163.com/outchain/player?type=2&id=26896342&auto=1&height=66';
- yyy.style.display = 'none';
- document.querySelector('.outwin').appendChild(yyy);
- </script>
复制代码
|
|