zoukankan      html  css  js  c++  java
  • div 圆角

    我们为移动浏览器提供一个备用的观看体验的想法都非常好。奇怪的是,当这种方法出现在桌面浏览器上时,他们却又不这么认为。

    -webkit-border-radius: 4px; 
    -moz-border-radius: 4px; 
    border-radius: 4px;

    注意:请在Safari 5 和 IE9浏览器中执行”border-radius”语法。

    许多读者也许不会意识到我们可以用这个属性来做一个圆。

    -moz-border-radius: 50px; 
    -webkit-border-radius: 50px; 
    border-radius: 50px;

    如果想再添加点效果,我们可以利用Flexible Box Model(详情在8中)来使得文字在垂直在水平方向都居中。这需要加点代码,但这仅仅是对不同浏览器的补偿。

    display: -moz-box; 
    display: -webkit-box; 
    display: box; 
    -moz-box-orient: horizontal;
    /* the default, so not really necessary here */
    -webkit-box-orient: horizontal; 
    box-orient: horizontal; 
    -moz-box-pack: center; 
    -moz-box-align: center; 
    -webkit-box-pack: center; 
    -webkit-box-align: center; 
    box-pack: center; 
    box-align: center;

  • 相关阅读:
    博客园代码
    前端
    1338. Reduce Array Size to The Half
    1220. Count Vowels Permutation
    363. Max Sum of Rectangle No Larger Than K
    366. Find Leaves of Binary Tree
    443. String Compression
    8 · Rotate String
    886. Possible Bipartition
    LT 183 wood cut
  • 原文地址:https://www.cnblogs.com/visi_zhangyang/p/1939057.html
Copyright © 2011-2022 走看看