Home > Web Front-end > HTML Tutorial > What attribute in CSS corresponds 100% to the parent node? _html/css_WEB-ITnose

What attribute in CSS corresponds 100% to the parent node? _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:16:21
Original
1112 people have browsed it

#DD{	position: relative;	top: 0px;	left: 0px;	width: 500px;	height: 300px;	overflow: hidden;}#A1{ 	position: relative;	width: 100%;	height: 100%;	padding-bottom: 50px;	background-color: #F00;}#A2{ 	position: relative;	width: 100%;	height: 100%;	border-bottom: solid 50px #000000; 	background-color: #F00;}#B{	position: relative;	top: 0px;	left: 0px;	width: 100%;	height: 100%;	overflow-x:hidden;	overflow-y:auto;	background-color: #00F;}
Copy after login


<html><head><link rel="stylesheet" href="css.css" type="text/css"></head><body><div id="DD">	<span id="A1">		<span id="B">			<ul>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>				<li>1</li>			</ul>		</span>	</span></div></body></html>
Copy after login


Replacing A1 with A2 is the same, the area of ​​B completely covers A, padding and border have no effect, what I want is B There is a 50px distance from the bottom of A to the bottom of A


Reply to the discussion (solution)

It was wrong when the page was first opened, but it was right after switching the page

>

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