overflow: scroll problem_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:13:54
Original
1017 people have browsed it

overflow: scroll
Always display the scroll bar
If you want to only display the bottom scroll bar, the one on the right is always unrealistic. How to write css


Reply to the discussion (solution)

overflow-x:scroll;

Correct answer upstairs. . .

overflow-x:auto;

overflow-x:scroll; Agree


Overflow is a feature of CSS2.1, and overflow-x/overflow-y It is a newly added feature in the CSS3 draft. The default values ​​of overflow-x/overflow-y are both 'visible'.

The CSS3 draft states that the calculated values ​​of 'overflow-x' and 'overflow-y' are equal to the set values, unless this A pair of values ​​is unreasonable. So, if one of them is set to one of 'scroll', 'auto', or 'hidden', and the other is 'visible', then 'visible' will be set to 'auto'.

There is a compatibility issue in IE. When one of overflow-x/overflow-y is set to 'scroll', 'auto', or 'hidden', the other one is still 'visible'. Will not be set to 'auto'.


Therefore, it is best to use "overflow-x:scroll; overflow-y:auto". At this time, the right one will be displayed when needed.

If you want the scroll bar on the right not to be displayed, then you can use: "overflow-x:scroll; overflow-y:hidden;"

I have been depressed by this for two days. There is always a horizontal scroll bar under IE6

Well, good, I learned from it.

The lectures on the 5th floor are more professional.

Related labels:
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!