代码之家  ›  专栏  ›  技术社区  ›  arbales

css3在webkit/safari中调整大小

  •  1
  • arbales  · 技术社区  · 15 年前

    我想用CSS3 resize 在Safari和火狐测试版中,完全可以调整DIV的大小。不管我做什么,我都不能让它发挥作用,有没有这种情况 调整大小 不能使用?

    1 回复  |  直到 14 年前
        1
  •  3
  •   Doug Neiner    15 年前

    为了让它在野生动物中工作,它似乎需要 overflow:auto 应用于分区。

    此外,显示器 height width div 将充当 min-height min-width .

    这只在Safari中有效,而不是在Firefox 3.5中。

    <div id="box"> Nice box </div>
    

    CSS(中文):

    #box {
       /* important */
       resize: both;
       overflow: auto;
    
       /* Styling */
       background: red;
       position: absolute; /* per the question */
       top: 50px;
       left: 50px;
       width: 300px
    }