Home > Backend Development > PHP Tutorial > javascript - 像我发的图片上这种文字效果有可能用程序输出来吗?

javascript - 像我发的图片上这种文字效果有可能用程序输出来吗?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-06 20:44:21
Original
827 people have browsed it

如图
比如我网站后台有一个textarea,我输入的文字,有可能在图片上输出这种效果吗?
PHP \ JS \ CSS3 都可以
javascript - 像我发的图片上这种文字效果有可能用程序输出来吗?

回复内容:

如图
比如我网站后台有一个textarea,我输入的文字,有可能在图片上输出这种效果吗?
PHP \ JS \ CSS3 都可以
javascript - 像我发的图片上这种文字效果有可能用程序输出来吗?

可以用CSS。

字周边发光可以用text-shadow: 0px 0px 5px rgba(80,80,250,.8);(颜色调的不好,可以自己试)

文字模糊这个比较复杂。chrome和safari可以用以下CSS解决:

  -webkit-filter: blur(5px);
  /* 以下几句目前没人支持 */
  -o-filter: blur(5px);
  -ms-filter: blur(5px);
  filter: blur(5px);
Copy after login

但是firefox目前不支持filter: blur。但是可以用svg filter:

<code>filter: url(blur.svg#effect);
</code>
Copy after login

然后创建blur.svg:

<code><svg version="1.1" xmlns="http://www.w3.org/2000/svg">
   <filter id="effect">
       <feGaussianBlur stdDeviation="5" />
   </filter>
</svg> 
</code>
Copy after login

而IE 9以前的版本可以用以下CSS:filter:progid:DXImageTransform.Microsoft.Blur(PixelRadius='3');

至于IE 10, 11。。。它们移除了微软自己的filter的支持,但又没有添加对CSS filter和svg blur的支持,所以是没法模糊的。用png吧。

参考:
http://caniuse.com/#search=blur
https://developer.mozilla.org/en-US/docs/Applying_SVG_effects_to_HTML_content

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template