简体   繁体   中英

Why is the vertical scrollbar always visible

Here is my plunker: http://plnkr.co/edit/q3MpeDT2rSSCUy8CHdUa?p=preview

div.tooltip {   
    position: absolute;         
    text-align: center;         
    width: 100px;                   
    height: 500px;                  
    padding: 2px;               
    font: 12px sans-serif;      
    background: lightsteelblue; 
    border: 0px;        
    border-radius: 8px;         
    overflow-y: scroll;
}

When you hover the mouse on one of the circles, a tooltip with vertical scrollbar is always visible even when the height is more than enough for the content. Why is vertical scroll always visible. How and I make it show up only when the content actually overflows?

只需将overflow-y:scroll更改为overflow-y:auto;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM