Common CSS dotted line example tutorials
DIV CSS dotted line tutorial includes CSS tutorials that explain DIV dotted line cases in various styles that often appear.
This section introduces common CSS dotted lines and DIV tutorials. CSS dotted lines, underlines, and list dotted lines are all handled.
1. CSS border dotted line
Here, the dotted line is controlled by the dotted border border of the border attribute. The css height (css height) and css width (css width) set below are 350 pixels for the convenience of viewing the demonstration. Other meanings.
One and four sides are dotted borders
border:1px dashed #000; black dotted border
Example:
CSS code: .divcss5{border:1px dashed #000; height :50px;width:350px}
Html code:
The border abbreviation is set here to define the four-sided borders of the divcss5 selector as 1px black dotted border
2. Dotted line on the left:
CSS code: .divcss5-1{border-left:1px dashed #000; height:50px;width:350px }
Html code:
Here I set a black dotted border on the left side
3. Dotted line on the right:
CSS code: .divcss5-2{border-right:1px dashed #000; height:50px;width:350px}
Html code:
Here I set the right side to be a black dotted border
4. The top edge (upper edge) is a dotted line:
CSS code: .divcss5-3{border-top:1px dashed #000; height:50px;width:350px}
Html code:
Here the top edge (upper edge) is set to a black dotted border
5. The bottom edge (lower edge) is a dotted line:
CSS code: .divcss5-4{border-bottom:1px dashed #000; height:50px;width:350px}
Html code:
Here, the bottom edge (lower line) is set as a black dotted border
6. If any side is not dotted, and the other three sides are dotted
Add a right border that is not dotted but has no edge, and the other three sides are black dotted borders
CSS code: .divcss5-5{border:1px dashed #000;border-right:0; height:50px;width :350px}
Html code:
Here by setting the The four sides of the object are black 1px dotted borders, and then one side is set to 0. This is equivalent to setting the dotted border attributes of 3 sides, but pay attention to the order of setting the border attributes here.
The complete DIV+CSS code of the above example is as follows:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
|
2. Hyperlink dotted line and underline
We often set the linked text content or Links have a dotted underline, or a dotted underline appears when the mouse is moved to the text with a link. How to achieve this? Here we will introduce you to the dotted underline of CSS hyperlinks.
1. Linked text has dotted underline
Here, the CSS style of the hyperlink a object is also controlled through the CSS border property.
Demonstration CSS code:
a{ border-bottom:1px dashed #111;}/* Here set the dotted underline to appear below the link text*/
a:hover{ border:0;} /* Here, set the dotted line not to appear when the mouse passes over the linked text */
Complete DIV CSS code:
1 2 |
|
Description: text-decoration:none; This is to remove the CSS underline ( The underline attribute that comes with hyperlinks by default)
The above is the detailed content of Common CSS dotted line example tutorials. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics





Using Bootstrap in Vue.js is divided into five steps: Install Bootstrap. Import Bootstrap in main.js. Use the Bootstrap component directly in the template. Optional: Custom style. Optional: Use plug-ins.

HTML defines the web structure, CSS is responsible for style and layout, and JavaScript gives dynamic interaction. The three perform their duties in web development and jointly build a colorful website.

There are two ways to create a Bootstrap split line: using the tag, which creates a horizontal split line. Use the CSS border property to create custom style split lines.

WebdevelopmentreliesonHTML,CSS,andJavaScript:1)HTMLstructurescontent,2)CSSstylesit,and3)JavaScriptaddsinteractivity,formingthebasisofmodernwebexperiences.

How to use the Bootstrap button? Introduce Bootstrap CSS to create button elements and add Bootstrap button class to add button text

To set up the Bootstrap framework, you need to follow these steps: 1. Reference the Bootstrap file via CDN; 2. Download and host the file on your own server; 3. Include the Bootstrap file in HTML; 4. Compile Sass/Less as needed; 5. Import a custom file (optional). Once setup is complete, you can use Bootstrap's grid systems, components, and styles to create responsive websites and applications.

There are several ways to insert images in Bootstrap: insert images directly, using the HTML img tag. With the Bootstrap image component, you can provide responsive images and more styles. Set the image size, use the img-fluid class to make the image adaptable. Set the border, using the img-bordered class. Set the rounded corners and use the img-rounded class. Set the shadow, use the shadow class. Resize and position the image, using CSS style. Using the background image, use the background-image CSS property.

To adjust the size of elements in Bootstrap, you can use the dimension class, which includes: adjusting width: .col-, .w-, .mw-adjust height: .h-, .min-h-, .max-h-
