我想将以下CSS代码添加到Opencart中的标头:
/*=======================================================
MBL Page Peel PRO Effect For Blogger
=======================================================*/
.admin-bar #PagePeel{top:27px;}
/*Extra 20px height and width to allow for shadow and movement*/
#PagePeel{
height:120px;
overflow:hidden;
position:absolute;
right:0;
top:0;
width:120px;
z-index:9999;
}
#PagePeel svg{
overflow: hidden;
position: absolute !important;
right: 0;
top: 0;
}
#PagePeel .pointCursor:hover{cursor:pointer;}
#mycontent { position:relative; margin-left:30px; }
以及以下代码到Opencart中的全局主体文件:
<!--MBL Page Peel PRO Effect For Blogger-->
<script type='text/javascript' src='https://googledrive.com/host/0B0WJjcJEFNziazIzXzlhMlhtWlU'></script>
<script type='text/javascript' src='https://googledrive.com/host/0B0WJjcJEFNziMmk4anpFWnRPWHc'></script>
<script type='text/javascript' src='https://googledrive.com/host/0B0WJjcJEFNzidExmT1JpWV9xNmc'></script>
<div id="mycontent">Peel Away Effect By <a href="http://www.mybloggerlab.com">MyBloggerLab.com</a></div>
<script type='text/javascript'>
/* <![CDATA[ */
var PagePeelProParams = {"smallImageUrl":"http://3.bp.blogspot.com/-8R2exm5kGEs/UP1mU6NRXaI/AAAAAAAAMNw/ale8VHoC3Aw/s1600/DottedAdvertSmall.png","largeImageUrl":"http://3.bp.blogspot.com/-_8kUOwvbkak/UP1kHs-ODwI/AAAAAAAAMNg/04l7M_kMZAE/s1600/Temppeel.png","peelColorStart":"#545454","peelColorEnd":"#cdcdcf","pagePeelTargetUrl":"http://www.templateism.com","pagePeelActivateEvent":"hover"};
/* ]]> */
</script>
那我该怎么办呢?
答案 0 :(得分:2)
包含Css文件代码:
$this->document->addStyle('catalog/view/theme/themename/stylesheet/product.css');
包含Js文件代码:
$this->document->addScript('catalog/view/theme/themename/js/product.js');
来源:http://chandreshrana.blogspot.in/2017/02/how-to-add-css-and-js-file-in-head.html
答案 1 :(得分:0)