CSS overflow attribute (June 02, 2015)_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:43:18
Original
1168 people have browsed it

Very basic knowledge, get a small skill every day...

1. Meaning

overflow attribute: The attribute stipulates when the element box Events that occur when content overflows the element box

In layman's terms, it is what happens when a child element placed in a parent element is larger than it

2. Attribute values ​​

3. Test example

We include a picture in a div, make the height of the picture greater than the width of the div, and then set different overflow values ​​​​of the div to see the actual page effect

<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title>overflow测试</title></head><style>    body{        margin:0px;        padding:0px;    }    .pic_wrap {        background-color: blue;        height: 310px;        width: 500px;        margin:0 auto;        overflow: hidden;    }</style><body><div class="pic_wrap">    <img src="img/Chrysanthemum.jpg"  width="320" height="320"></div></body></html>
Copy after login

1. Set the value to visible

2. Set the value to hidden

3. Set the value to scroll

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!