How to express dotted box in css

WBOY
Release: 2021-11-29 18:46:57
Original
4676 people have browsed it

How to express the dotted box in css: 1. "Element {border-style:dashed;}", the "dashed" value means setting the border to a dotted style; 1. "Element {border-style:dotted" ;}", the "dotted" value means to set the border to a dotted style.

How to express dotted box in css

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

How to express the dotted box in css

There are two ways to express the dotted box in css.

1. Use border-style: dashed; style, the example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style type="text/css">
    div{
        width:100px;
        height:100px;
        background-color:red;
        border-style: dashed;
    }
        </style>
</head>
<body>
<div> </div>
</body>
</html>
Copy after login

Output result:

How to express dotted box in css

2. Use border- style: dotted; style, the example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style type="text/css">
    div{
        width:100px;
        height:100px;
        background-color:red;
        border-style: dotted;
    }
        </style>
</head>
<body>
<div> </div>
</body>
</html>
Copy after login

Output result:

How to express dotted box in css

## (Learning video sharing:

css video tutorial)

The above is the detailed content of How to express dotted box 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!