This article introduces the sample code of CSS to achieve the effect of horizontal lines on both sides of the text center, and shares it with you. The specific notes are as follows: Effect: <!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> <meta http-equiv="X-UA-Compatible" content="ie=edge"> <title>Document</title> <style> .title{ text-align: center; position: relative; height: 50px; line-height: 50px; width: 800px; margin: 200px auto; } .title:after,.title:before{ content: ""; position: absolute; top: 50%; background: #7a7a7a; height: 1px; width: 35%; } .title:after{ left: 0; } .title:before{ right: 0; } </style> </head> <body> <div class="title">CSS to achieve the effect of horizontal lines on both sides of the text center</div> </body> </html> The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: Steps to restore code from a Docker container image
>>: H tags should be used reasonably in web page production
Table of contents Preface 1. 404 Page 1. Causes 2...
Zabbix automatically discovers rules to monitor s...
When the same function and HTML code are used mul...
/******************** * Application of linked lis...
You may already know that the length 1 of int(1) ...
Preface NFS (Network File System) means network f...
Use the rpm installation package to install mysql...
Table of contents Preface Type Inference Truth va...
Table of contents 1. Introduction 2. Output Infor...
Following are the quick commands to clear disk sp...
MyISAM and InnoDB are the most common storage eng...
In Beginners' Understanding MySQL Deadlock Pr...
Table of contents 1. Constraint concepts and clas...
During normal project development, if the MySQL v...
Table of contents Preface Introduction to QueryCa...