我有一个glyphicon这样:
<div class="col-xs-4 col-sm-2">
<span class="glyphicon glyphicon-circle-arrow-up glyphicon-large"></span>
</div>
Run Code Online (Sandbox Code Playgroud)
.glyphicon-large {
min-height: 260px;
font-size: 35px;
width: 1em;
display: block;
top: 50%;
margin: -0.5em auto 0px;
}
Run Code Online (Sandbox Code Playgroud)
glyphicon不会垂直对齐中心.当我打开firefox,检查元素,并关闭/打开top 50%规则,它突然工作.怎么会?
在我的更新XML中,我有:
<reference name="content">
<remove name="product.info" />
<block type="catalog/product_view" template="catalog/product/imageview.phtml">
<action method="setData"><name>variable</name><value>3</value></action>
</block>
</reference>
Run Code Online (Sandbox Code Playgroud)
我创建了imageview.phtml并正确加载.在此模板中,我转储以下内容:
var_dump($this->getVariable());
Run Code Online (Sandbox Code Playgroud)
我的预期结果是:3
但结果是:NULL
我错过了什么?
我最近在Java中了解到:==比较对象引用,而不是内容,这就是为什么:
String str1 = "hell";
String str2 = "o";
String str3 = str1 + str2;
String str4 = "hello";
str3 == str4; // False
Run Code Online (Sandbox Code Playgroud)
到现在为止还挺好.但是,当我执行以下操作时:
String str5 = "hello";
str5 == str4; // True
Run Code Online (Sandbox Code Playgroud)
这是否意味着str5和str4引用相同的内存对象?这是如何运作的?