ก็คือ อย่างแรก เรามีไฟล์ css แล้วนำโค้ดนี้ไปใส่ในไฟล์ css ของเรา
โค้ด: เลือกทั้งหมด
#breadcrumb {
list-style: none;
display: inline-block;
}
#breadcrumb .icon {
font-size: 14px;
}
#breadcrumb li {
float: left;
}
#breadcrumb li a {
color: #FFF;
display: block;
background: #e7325a;
text-decoration: none;
position: relative;
height: 40px;
line-height: 40px;
padding: 0 10px 0 5px;
text-align: center;
margin-right: 23px;
}
#breadcrumb li:nth-child(even) a {
background-color: #e7325a;
}
#breadcrumb li:nth-child(even) a:before {
border-color: #e7325a;
border-left-color: transparent;
}
#breadcrumb li:nth-child(even) a:after {
border-left-color: #e7325a;
}
#breadcrumb li:first-child a {
padding-left: 15px;
-moz-border-radius: 4px 0 0 4px;
-webkit-border-radius: 4px;
border-radius: 4px 0 0 4px;
}
#breadcrumb li:first-child a:before {
border: none;
}
#breadcrumb li:last-child a {
padding-right: 15px;
-moz-border-radius: 0 4px 4px 0;
-webkit-border-radius: 0;
border-radius: 0 4px 4px 0;
}
#breadcrumb li:last-child a:after {
border: none;
}
#breadcrumb li a:before, #breadcrumb li a:after {
content: "";
position: absolute;
top: 0;
border: 0 solid #e7325a;
border-width: 20px 10px;
width: 0;
height: 0;
}
#breadcrumb li a:before {
left: -20px;
border-left-color: transparent;
}
#breadcrumb li a:after {
left: 100%;
border-color: transparent;
border-left-color: #e7325a;
}
#breadcrumb li a:hover {
background-color: #e65272;
}
#breadcrumb li a:hover:before {
border-color: #e65272;
border-left-color: transparent;
}
#breadcrumb li a:hover:after {
border-left-color: #e65272;
}
#breadcrumb li a:active {
background-color: #e65272;
}
#breadcrumb li a:active:before {
border-color: #e65272;
border-left-color: transparent;
}
#breadcrumb li a:active:after {
border-left-color: #e65272;
}
โค้ด: เลือกทั้งหมด
<?php
$document = JFactory::getDocument();
$document->addStyleSheet('/helix3/templates/shaper_helix3/css/mooziicart.css');
?>
โค้ด: เลือกทั้งหมด
<ul id="breadcrumb">
<li><a href="#"><span class="icon icon-home"> </span></a></li>
<li><a href="#"><span class="icon icon-beaker"> </span> Projects</a></li>
<li><a href="#"><span class="icon icon-double-angle-right"></span> Breadcrumb</a></li>
<li><a href="#"><span class="icon icon-rocket"> </span> Getting started</a></li>
</ul>
- กำหนด id ให้เหมือนใน css
- โค้ดนี้ผมมี อยู่ 4 สเต็บครับก็เลยก็เลยใส่เป็น loop ไปครับ
โค้ด: เลือกทั้งหมด
<ul id = "breadcrumb">
<?php foreach($this->steps as $k=>$step){?>
<li> <a class = "jshop_order_step <?php print $this->cssclass[$k]?>">
<?php print $step;?> </a></li>
<?php }?>
</ul>