2011年10月20日
今天的教程、如图:
1. 设计 → 修改 HTML
2. Ctrl + F 、找
3. 把以下的code paste在 的后面
<script src='http://pujangga.googlecode.com/files/jquery.tools.min.js' type='text/javascript'/>
<script type='text/javascript'>
$(document).ready(function(){
$("#accordion").tabs("#accordion div.pane", {tabs: 'h2', effect: 'slide', initialIndex: null});
};
如图:
4. 按 保存模板、*等等!还没完
5. 页面元素 → 添加小工具 → HTML/JavaScript
6. 把以下的code paste 到 HTML/JavaScript
<style type="text/css">
h5 {
font-family: trebuchet-ms, arial, tahoma;
font-size: 13px;
padding: 0 0 1em;
font-weight:bold;
color: #ffffff;
}
.msg_list {
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
.msg_head {
padding: 5px 10px;
cursor: pointer;
position: relative;
background-color:#FFB6D6;
margin:1px;
-moz-border-radius: 35px;
border-radius: 35px;
}
.msg_body {
padding: 5px 10px 15px;
background-color:#FFFFFF;
}
</style>
<script type="text/javascript" src="https://sites.google.com/site/jquery01/tabmenuaccordion.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
//hide the all of the element with class msg_body
$(".msg_body").hide();
//slides the element with class "msg_body" when paragraph with class "msg_head" is clicked
$("#firstpane h5.msg_head").click(function()
{
$(this).next("div.msg_body").slideToggle(700).siblings("div.msg_body").slideUp("slow");
});
//slides the element with class "msg_body" when mouse is over the paragraph
$("#secondpane h5.msg_head").mouseover(function()
{
$(this).next("div.msg_body").slideDown("slow").siblings("div.msg_body").slideUp("slow");
});
});
</script>
<div class="msg_list" id="secondpane">
<h5 class="msg_head">标题 1</h5>
<div class="msg_body">
<center>
标题 1 里面的内容</div>
<h5 class="msg_head">标题 2</h5>
<div class="msg_body">
标题 2 俩面的内容
</div>
<h5 class="msg_head">标题 3</h5>
<div class="msg_body">
标题 3 俩面的内容</div>
</div>
h5 {
font-family: trebuchet-ms, arial, tahoma;
font-size: 13px;
padding: 0 0 1em;
font-weight:bold;
color: #ffffff;
}
.msg_list {
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
.msg_head {
padding: 5px 10px;
cursor: pointer;
position: relative;
background-color:#FFB6D6;
margin:1px;
-moz-border-radius: 35px;
border-radius: 35px;
}
.msg_body {
padding: 5px 10px 15px;
background-color:#FFFFFF;
}
</style>
<script type="text/javascript" src="https://sites.google.com/site/jquery01/tabmenuaccordion.js"></script>
<script type="text/javascript">
$(document).ready(function()
{
//hide the all of the element with class msg_body
$(".msg_body").hide();
//slides the element with class "msg_body" when paragraph with class "msg_head" is clicked
$("#firstpane h5.msg_head").click(function()
{
$(this).next("div.msg_body").slideToggle(700).siblings("div.msg_body").slideUp("slow");
});
//slides the element with class "msg_body" when mouse is over the paragraph
$("#secondpane h5.msg_head").mouseover(function()
{
$(this).next("div.msg_body").slideDown("slow").siblings("div.msg_body").slideUp("slow");
});
});
</script>
<div class="msg_list" id="secondpane">
<h5 class="msg_head">标题 1</h5>
<div class="msg_body">
<center>
标题 1 里面的内容</div>
<h5 class="msg_head">标题 2</h5>
<div class="msg_body">
标题 2 俩面的内容
</div>
<h5 class="msg_head">标题 3</h5>
<div class="msg_body">
标题 3 俩面的内容</div>
</div>
蓝色部分:标签菜单的字体颜色
紫色部分:标签菜单的背景颜色
黄色部分:标签菜单里面的内容背景颜色
红色部分:标签菜单里面的内容 *放你的小工具`代码
7. 完成
成功了别忘了 留言+ 按LIKE 吖、这是一种礼貌 >\\\\\<
不成功 :(
ReplyDelete我的blog 不允许...
不好意思,打扰了><
谢谢你的分享啊 !! 我成功了 ~ :D
ReplyDelete成功!谢谢你的分享 :)
ReplyDelete成功了!谢谢! ^^v
ReplyDelete成功了 ! 謝謝你 :D
ReplyDelete