好的,这是我第一次使用html5boilerplate,但无法从我的css文件中获取IE样式.
我在标题中有这个(根据页面设置)
<!doctype html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]-->
<!-- Consider adding a manifest.appcache: h5bp.com/d/Offline -->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]-->
<head>
Run Code Online (Sandbox Code Playgroud)
在我的样式表中我有
#container { float:right; margin-top: 0px; }
.ie6 #container { margin-top: 5px; }
.ie7 #container { margin-top: 10px; }
.ie8 #container { margin-top: 15px; }
Run Code Online (Sandbox Code Playgroud)
它不起作用.这真的很简单,我错过了什么.
您的建议表示赞赏.
这可能看起来微不足道,但它伤害了我的头脑.有人可以解释原因http://php.net/manual/es/function.explode.php示例显示(我已经修剪过).
$pizza = "piece1 piece2 piece3"; // string
$pieces = explode(" ", $pizza);
// after a var dump
array(3) { [0]=> string(6) "piece1"
[1]=> string(6) "piece2"
[2]=> string(6) "piece3" }
Run Code Online (Sandbox Code Playgroud)
这很可爱,删除了所有的空间并做了一个很好的小数组,但是当我使用下面显示的类似的东西时
$path = "/test-gallery/2/"; // string
$urlpieces = explode("/", $path);
// after a var dump
array(4) { [0]=> string(0) ""
[1]=> string(12) "test-gallery"
[2]=> string(1) "2"
[3]=> string(0) "" }
Run Code Online (Sandbox Code Playgroud)
我得到第一个和最后一个空字符串.为什么不删除第一个和最后一个数组元素?我总是可以添加另一个步骤并删除它,但爆炸应该把它全部拿出来不应该吗?
在此先感谢您的建议.