Html/css front end for text border shadow effect instance sharing

Source: Internet
Author: User
In the development of the shadow effect is now more and more widely used, so today we will say the same way to achieve the border shadow. The following script of the small to everyone to bring the html/css front-end to achieve the text border shadow effect, the need for friends to refer to the next bar, hope to help everyone.

A. Border Shadow

Box-shadow Border Shadow

Parameter: Parameter 1 X-shadow: Sets the shadow horizontal offset value of the object, which can be px, EM, or percent, allowing negative values. Parameter 2 Y-shadow: Sets the shadow vertical offset value of the object, which can be px, EM, or percent, allowing negative values. Parameter 3 blur: used to set the border shadow radius size. Parameter 4 spread: Extend the radius, set the size of the shadow; This parameter is optional and the default value is 0. Parameter 5 color: Sets the colors of the shadow. Parameter 6 inset: This parameter is not set by default. By default it is an outer shadow, and inset represents an inner shadow.

Box-shadow:x-shadow y-shadow blur spread color inset;

Two. Example

Effect 1

Effect Two

How are we going to achieve this?

HTML structure CSS style font style font color Border Shadow Let's take a look at the specific code:

Html:

<p class= "box" >box-shadow</p>

Css:

.box{width:300px;    height:150px;    Background:deepskyblue;    font:30px/150px ' Microsoft Yahei ';    Color: #fff;    Font-weight:bold;    Text-align:center;    margin:100px Auto;    /* Border Shadow */* effect 1*/box-shadow:inset 5px 5px 20px #ccc; /* Effect 2*/box-shadow:inset 5px 5px 20px pink,5px 5px 20px #000;} 
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.