Home > Web Front-end > HTML Tutorial > How to realize long horizontal line in DIV? and others_html/css_WEB-ITnose

How to realize long horizontal line in DIV? and others_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:50:06
Original
1525 people have browsed it

Question 1. The long horizontal lines implemented by this code are always spaced from the left and right sides of the screen. . . Looking for a way to write without spacing



Question 2. This code requires a smooth shadow under the horizontal line.


Reply to discussion (solution)

<style>  *{margin:0px;padding:0px;}  div{border:none;box-shadow: 0 0 5px #888;border-bottom: 1px solid #ebebeb;width:100%;height:100px;background:#fff;-webkit-transform: translateZ(0);}</style><div></div>
Copy after login

#aa {	margin:15px -50px 0px -50px;	padding:0;	width:auto;	height:1px;	background-color:#191919;	overflow:hidden;	box-shadow:0px 1px 2px #373737;}
Copy after login

<div id="aa"></div>
Copy after login

Shaded The css style is box-shadow, please refer to the w3school css3 part

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