当前位置:网站首页>文本截取图片(哪吒之魔童降世壁纸)
文本截取图片(哪吒之魔童降世壁纸)
2022-07-27 14:39:00 【前行的枫】
background-clip:text兼容性不太好
1.文字截取背景色:兼容IE9+、Firefox、Opera、Chrome 以及 Safari
2.文字截取背景图片:只兼容Chrome
效果图:
<style> body, html {
width: 100%;
height: 100%;
background: #000;
overflow: hidden;
}
* {
padding: 0;
margin: 0;
}
div span {
display: inline-block;
width: 100%;
height: 100%;
background: url('http://img1.imgtn.bdimg.com/it/u=4003626994,439538869&fm=11&gp=0.jpg') no-repeat;
background-size: cover;
-webkit-background-clip: text;
background-clip: text;
color: transparent;
font-size: 20px;
font-weight: bolder;
}
</style>
<div>
<span></span>
</div>
var span = document.getElementsByTagName('span')[0];
var spanText = '';
for (var i = 0; i < 360; i++) {
spanText += '哪吒魔童降世'
}
span.innerHTML = spanText;
边栏推荐
- C language: minesweeping games
- [regular expression] matches multiple characters
- Division of entity classes (VO, do, dto)
- [regular expression] matching grouping
- Mlx90640 infrared thermal imager temperature sensor module development notes (VII)
- 【云享读书会第13期】音频文件的封装格式和编码格式
- 渗透测试-干货 | 80篇+网络安全面试经验帖(面试篇)
- 兆骑科创创业大赛策划承办机构,双创平台,项目落地对接
- Push down of spark filter operator on parquet file
- First acquaintance with MySQL database
猜你喜欢

Voice live broadcast system -- a necessary means to improve the security of cloud storage

CAS比较交换的知识、ABA问题、锁升级的流程

DRF学习笔记(四):DRF视图

C language: custom type
![[sword finger offer] interview question 49: ugly number](/img/7a/2bc9306578530fbb5ac3b32254676d.png)
[sword finger offer] interview question 49: ugly number

Addition, deletion, query and modification of MySQL table data

Understand │ what is cross domain? How to solve cross domain problems?

First acquaintance with MySQL database

C language: data storage

Constraints, design and joint query of data table -- 8000 word strategy + Exercise answers
随机推荐
Pycharm导入已有的本地安装包
网络层的IP协议
First acquaintance with MySQL database
First understanding of structure
Implementation of spark lazy list files
[system programming] process, thread problem summary
profileapi.h header
After the table is inserted into an in row formula, the cell loses focus
线程中死锁的成因及解决方案
[regular expression] matches multiple characters
快速高效删除node_modules
js操作dom节点
C language: Sanzi game
DRF学习笔记(三):模型类序列化器ModelSerializer
__typeof和typeof的差异
[sword finger offer] interview question 51: reverse pairs in the array - merge sort
Hematemesis finishing c some commonly used help classes
Learn parquet file format
【云享读书会第13期】FFmpeg 查看媒体信息和处理音视频文件的常用方法
Zhaoqi scientific innovation and entrepreneurship competition planning and undertaking organization, mass entrepreneurship and innovation platform, project landing and docking