CSS3的box-sizing属性图文教程

php中世界最好的语言
Release: 2018-03-22 16:08:32
original
1509 people have browsed it

这次给大家带来CSS3的box-sizing属性图文教程,使用CSS3的box-sizing属性注意事项有哪些,下面就是实战案例,一起来看一下。

简介

box-sizing属性包括content-box(default),border-box,padding-box。

     1、content-box,border和padding不计算入width之内

     2、padding-box,padding计算入width内

     3、border-box,border和padding计算入width之内,其实就是怪异模式了~

注意:

ie8+浏览器支持content-box和border-box;

ff则支持全部三个值。

使用时:

-webkit-box-sizing: 100px; // for ios-safari, android

-moz-box-sizing:100px; //for ff

box-sizing:100px; //for other

示例如下:

Copy after login

截图(ff):

相信看了本文案例你已经掌握了方法,更多精彩请关注php中文网其它相关文章!

推荐阅读:

在CSS边界线消失如何处理

实现多背景模拟动态边框

The above is the detailed content of CSS3的box-sizing属性图文教程. For more information, please follow other related articles on the PHP Chinese website!

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 [email protected]
Popular Tutorials
More>
Latest downloads
More>
web effects
Website source code
Website materials
Front end template
About us Disclaimer Sitemap
PHP Chinese website:Public welfare online PHP training,Help PHP learners grow quickly!