How to achieve font long shadow effect in css

王林
Release: 2020-05-18 09:12:45
forward
3029 people have browsed it

How to achieve font long shadow effect in css

First let’s take a look at the implementation effect, as shown in the figure below:

How to achieve font long shadow effect in css

Important attributes:

text The -shadow property sets a shadow to the text.

(Video tutorial recommendation: css video tutorial)

HTML code:

<div class="long-shadow">屮艸芔茻</div>
Copy after login

CSS code:

 .loop(@counter) when (@counter > 0) {
    .loop((@counter - 1));
    text-shadow+: (1px * @counter) (1px * @counter) #2d585a;
  }
 .long-shadow{
    overflow: hidden;
    background-color: #5f9ea0;
    width:800px;
    height: 160px;
    line-height: 160px;
    text-align: center;
    letter-spacing: 80px;
    color: #fff;
    font-size: 100px;
    .loop(200);
  }
Copy after login

Recommended tutorial: CSS basic tutorial

The above is the detailed content of How to achieve font long shadow effect in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template