如何在结帐页面magento 1.9上的送货地址中添加tootips EX:用于指示此提交的工具提示是针对正在接收花的人
答案 0 :(得分:0)
以下是我们如何使用css
在结帐页面上显示工具提示示例:
Step-1 : open file app\design\frontend\rwd\default\template\checkout\onepage\shipping.phtml and paste css
<style>
.tooltip {
position: relative;
display: inline-block;
border-bottom: 1px dotted black;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 120px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px 0;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 1s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
步骤2:找到
<label for="shipping:company"><?php echo $this->__('Company') ?></label>
并替换为
<label class="tooltip" for="shipping:company"><span class="tooltiptext">Tooltip text</span><?php echo $this->__('Company') ?></label>