博主:Moony和梨子

博主目前狀態: 要考試了(淚奔——

對部落格有疑問?:点击发表疑問
對這裡有啥意见?:点击发表意见


"不要認為你做不到,很多事情只是看你願意花多少心思去做而已"

点击图片才能看到部落格 (Click To Enter)

依依: 可以发Click TO Enter 的教程吗?
当然没有问题 :)

所谓的Click TO Enter就是这样: 
画到很丑~拍写啊 >///<''

功能: 要点击图片才可以看到部落格

首先,请到
设计(Design)> Edit HTML
按 Ctrl+F 或 F3
]]></b:skin> 這個字 

再把以下的代码拷贝起来:
</style>
<script language="javascript" type="text/javascript">
/* toggle() checks to see if the images has already been faded
or not and sends the appropriate variables to opacity(); */
function toggle(el,milli) {
// Get the opacity style parameter from the image
var currOpacity = document.getElementById(el).style.opacity;
if(currOpacity != 0) { // if not faded
fade(el, milli, 100, 0);
} else { // else the images is already faded
fade(el, milli, 0, 100);
}
}
/* changeOpacity() uses three different opacity settings to
achieve a cross-browser opacity changing function. This
function can also be used to directly change the opacity
of an element. */
function changeOpacity(el,opacity) {
var image = document.getElementById(el);
// For Mozilla
image.style.MozOpacity = (opacity / 100);
// For IE
image.style.filter = "alpha(opacity=" + opacity + ")";
// For others
image.style.opacity = (opacity / 100);
}
/* fade() will fade the image in or out based on the starting
and ending opacity settings. The speed of the fade is
determined by the variable milli (total time of the fade
in milliseconds)*/
function fade(el,milli,start,end) {
var fadeTime = Math.round(milli/100);
var i = 0; // Fade Timer
// Fade in
if(start < end) {
for(j = start; j <= end; j++) {
// define the expression to be called in setTimeout()
var expr = "changeOpacity('" + el + "'," + j + ")";
var timeout = i * fadeTime;
// setTimeout will call 'expr' after 'timeout' milliseconds
setTimeout(expr,timeout);
i++;
}
}
// Fade out
else if(start > end) {
for(j = start; j >= end; j--) {
var expr = "changeOpacity('" + el + "'," + j + ")";
var timeout = i * fadeTime;
setTimeout(expr,timeout);
i++;
}
}
}
</script>
<div class="input" onClick="javascript:toggle('wise', 3000); this.style.display='none';
document.getElementById('june').style.display=''">
<img src="图片URL"
style="opacity:0.4;filter:alpha(opacity=40)"
onmouseover="this.style.opacity=1;this.filters.alpha.opacity=100"
onmouseout="this.style.opacity=0.7;this.filters.alpha.opacity=40"/>
</div>
<div id="wise" style="filter : alpha(opacity=0); -moz-opacity : 0; opacity : 0;">
<div id="june" style="display : none;">
<body>
粘贴在 ]]></b:skin> 上面
如圖 :
紅色框框都是以上的代碼,由於代碼太長的關係,所以沒有拍完整的。
記得把图片URL换成你要的图片代码哦!

要把那圖片放去中間的話,


首先按Ctrl+F或F3 找 body {

過後把以下的代碼粘貼在body {上面
.input {
text-align: center;
margin-top: 100px;
Margin-top 可以自己調 [意思是圖片與上面的距離]

这里有我制作的 图片 :))
点我

這樣就可以了哦 :))
祝你成功 :)

18 comments:

  1. 我的图案好像太大了 ><
    有办法把他给弄小吗?

    ReplyDelete
  2. 你可以下載“美圖秀秀”來弄小他 ^^
    http://xiuxiu.meitu.com/download/

    ReplyDelete
  3. 去了你的Blog已经看到你弄到了哦 ^^
    大爱你的背景音乐 <3

    ReplyDelete
  4. 请问下怎么放图片到中间啊?都在左上角 T.T

    ReplyDelete
  5. 新模板和久模板都可以吗?
    为什么我的新模板不可以的?

    ReplyDelete
  6. @Kumiko : 我已經把教程編輯了 :))

    @壽司 : 兩種版本都可以哦~

    @Xiao Ying : 我已把教程編輯了,再試看吧~

    ReplyDelete
  7. 一开始弄到了。。。可是过后把它删除。。。再重新弄的时候就不可以了><怎么办?

    ReplyDelete
  8. @Dear Yog : 這可能是代碼問題吧,檢查好代碼看看有什麼不見的 :)

    霸道教主 : 在你要的圖片 Right-click, 然後點擊 Copy Image URL 就是你的 圖片url了。

    I'm Jia Sue Lee : 我將會設計一些圖片 :))

    ReplyDelete
  9. 不好意思想借问,我弄到了,但是在还没按之前,还是看得见我的部落格的背景,怎么办?

    ReplyDelete
    Replies
    1. 弄了都還是會看到你的部落格背景的哦 ><

      Delete
  10. 为什么我弄了最上面的 Follow Share Roport Abuse Next Blog>>那些会跑到旁边的gadget?

    ReplyDelete
  11. 梨子啊,为什么在我要save都时候,会出现Invalid variable declaration in page skin: The skin variables could not be parsed as they are not well-formed. Input:
    这一段字?

    ReplyDelete

有任何疑问,就请留言 :)
先声明:不接受恶意批评与留言。

欢迎再次光临。
谢谢。

------------月梨心---------------