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
WBOYOriginal
2016-06-24 11:50:061527browse

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
7c3f64f5944778ede5f3cca04c4412d2 16b28748ea4df4d9c2150843fecfba68

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


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>

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

<div id="aa"></div>

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

Statement:
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