line-block:本身是内联盒模型的存在,又具备块状盒模型的特性。很好很强大的东西啊~
网上找到的正规描述:
PS:可惜IE不支持,FF也不支持。HOHO~
IE解决方案:触发IE的,从而使该元素具备类似line-block的特性。
FF解决方案:使用moz专属属性:display::-moz-inline-box;
?
?
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Strict//EN” ““>
<html xmlns=”” lang=”zh-CN” xml:lang=”zh-CN”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<meta name=”keywords” content=”PRcss,xhtml,html,css,js,book,个人主页,无聊,神经,懒惰” />
<meta name=”description” content=”PRcss的个人主页,无聊的,神经的,懒惰的…” />
<meta name=”Author” content=”PRcss,qq:50198763″ />
<meta name=”Copyright” content=”本页版权归PRcss所有。All Rights Reserved” />
<link rel=”shortcut icon” href=”” />
<title>line-block的运用:最小宽度的设置 – >
<style type=”text/css”><!–
.box { display:inline; zoom:1; min-width:400px; width:auto!important; width:400px; clear:right; border:1px solid #000; background:#ccc; }
html:lang(zh-CN) .box { display:-moz-inline-box; }
.box img { display:block; width:100px; height:300px; background:#c00; }
–></style>
</head>
<body>
<p class=”box”>
<img src=”pr.jpg” />
</p>
<p>测试</p>
</body>
</html>
最新评论
写的挺好的
有没有兴趣翻译 impatient js? https://exploringjs.com/impatient-js/index.html
Flexbox playground is so great!
感谢总结。
awesome!
这个好像很早就看到类似的文章了
比其他的教程好太多了
柯理化讲的好模糊…没懂