How to set the shadow on the right and bottom of the border in css

WBOY
Release: 2021-12-06 13:44:24
Original
8895 people have browsed it

In CSS, you can use the "box-shadow" attribute to set the shadow on the right and bottom sides of the element's border. The function of this attribute is to set the border shadow style of the element. The syntax is "element {box-shadow: to Right shadow value down shadow value blur spread color ;}".

How to set the shadow on the right and bottom of the border in css

The operating environment of this tutorial: Windows 10 system, CSS3&&HTML5 version, Dell G3 computer.

How to set the shadow on the right and bottom of the border in css

In css, you can use the box-shadow attribute to set the shadow on the right and bottom of the border Shadow, the function of the box-shadow attribute is to set one or more drop-down shadow borders for the element. Its syntax format is as follows:

box-shadow: h-shadow v-shadow blur spread color inset;
Copy after login

The attribute value represents the following:

How to set the shadow on the right and bottom of the border in css

The example is as follows:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>123</title> 
<style> 
div{
width:300px;
height:100px;
background-color:yellow;
box-shadow: 50px 20px 10px #888888;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
Copy after login

Output result:

How to set the shadow on the right and bottom of the border in css

(Learning video sharing: css video tutorial)

The above is the detailed content of How to set the shadow on the right and bottom of the border in css. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
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