Home >
Article > Web Front-end > I deducted an effect from the blog network_Image special effects
I deducted an effect from the blog network_Image special effects
WBOYOriginal
2016-05-16 19:12:551097browse
I deducted an effect from the blog website, but there is something I can't figure out. I asked Wuyouqiang to help me research it. Demo now: http://www.iyumen.cn/TopUser.asp Effect description: Put the mouse on the avatar, and the avatar will automatically transform into another picture. Because there are two formats of images on my website, gif and jpg, so now if the original image is jpg, there is no problem. If it is gif, there will be a prompt saying that the avatar has not been uploaded. In fact, there is, but there is no setting in the js to read it. Get the gif.
So, the function I want is to put the mouse on the picture without changing to another picture. Can this be done?
I have made the source code involved in this page into a compressed package to facilitate downloading and modification by experts. Maybe I didn't describe it very clearly.
" oo("imgtanchu").innerHTML=imgtanchuhtml; oo("arrow_img").style.background="url(http://www.iyumen.cn/images/imgs/avatar_left.gif) top repeat-x; #ff0000;" oo("ll").src="http://www.iyumen.cn/images/imgs/avatar_border2.gif" oo("lr").src="http://www.iyumen.cn/images/imgs/avatar_border.gif" oo("showlogoimg").innerHTML="" user ; oo("link_1").innerHTML="去" user "的主页"; if(loginstate==0){
oo("link_3").innerHTML="给" user "发短消息"; }else{ oo("link_3").innerHTML="给" user "发短消息"; } oo("link_4").innerHTML="查看" user "的评论列表"; oo("oDiv").style.left=(el-10) "px"; oo("oDiv").style.top=(et-3) "px"; oo("oDiv").style.display=''; } state=1; } }else if(sign==2){ state=0; } }
function disnav(){ var dis=oo("navigation_logo").style.display; if(dis=="none"){ oo("navigation_logo").style.display=''; oo("arrow_img").style.background="url('http://www.iyumen.cn/images/imgs/avatar_left.gif')"; ssh=sh 50; showi=1; }else{ oo("navigation_logo").style.display='none'; oo("arrow_img").style.background="url('http://www.iyumen.cn/images/imgs/avatar_right.gif')"; showi=0; } }
function disnav2(){ var dis=oo("navigation_logo").style.display; if(dis=="none"){ oo("navigation_logo").style.display=''; oo("arrow_img").style.background="url('http://www.iyumen.cn/images/imgs/avatar_right.gif')"; ssh=sh 50; showi=1; }else{ oo("navigation_logo").style.display='none'; oo("arrow_img").style.background="url('http://www.iyumen.cn/images/imgs/avatar_left.gif')"; showi=0; } }
var obj=document.getElementById("d") var t=new Object(); function show(){ obj.style.display=""; obj.style.width=document.body.clientWidth; obj.style.height=document.body.clientHeight; if(obj.filters.alpha.opacity>25){ obj.filters.alpha.opacity=25; clearTimeout(t.timer1); return; }else{ obj.filters.alpha.opacity =2; t.timer1=setTimeout("show()",10) } return; } function hide(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none" clearTimeout(t.timer2) return; }else{ obj.filters.alpha.opacity-=2; t.timer2=setTimeout("hide()",5); } }else{ obj.style.display="none" } return; }
var sPop = null; var postSubmited = false; var smdiv = new Array();
var userAgent = navigator.userAgent.toLowerCase(); var is_webtv = userAgent.indexOf('webtv') != -1; var is_kon = userAgent.indexOf('konqueror') != -1; var is_mac = userAgent.indexOf('mac') != -1; var is_saf = userAgent.indexOf('applewebkit') != -1 || navigator.vendor == 'Apple Computer, Inc.'; var is_opera = userAgent.indexOf('opera') != -1 && opera.version(); var is_moz = (navigator.product == 'Gecko' && !is_saf) && userAgent.substr(userAgent.indexOf('firefox') 8, 3); var is_ns = userAgent.indexOf('compatible') == -1 && userAgent.indexOf('mozilla') != -1 && !is_opera && !is_webtv && !is_saf; var is_ie = (userAgent.indexOf('msie') != -1 && !is_opera && !is_saf && !is_webtv) && userAgent.substr(userAgent.indexOf('msie') 5, 3);
var sw,sh; sw=document.body.clientWidth sh=document.body.clientHeight
var obj=document.getElementById("dssss") var t=new Object(); function show(){ var screet=eet-300; scrollTo(0,screet); if (window.navigator.userAgent.indexOf("MSIE")>=1){ obj.style.display=""; oo("info_dsss").style.left=(document.body.offsetWidth-400)/2 "px";
function hide_in(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none"
function show_login(){ scrollTo(0,0); oo("login-out").style.display=""; oo("login-pop").style.display=""; }
function show_login2(){ oo("oDiv").style.display="none"; oo("navigation_logo").style.display="none"; oo("arrow_img").style.background="url('http://www.iyumen.cn/images/imgs/avatar_right.gif')"; showi=0; scrollTo(0,0); oo("login-out").style.display=""; oo("login-pop").style.display="" }
function hide(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none"
function hide_login(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none"
function hide_out(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none"
function hide_add(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none"
function hide_black(){ if (window.navigator.userAgent.indexOf("MSIE")>=1){ if(obj.filters.alpha.opacity<=0){ obj.filters.alpha.opacity=0; obj.style.display="none"
var loghref=location.href ; oo("login_url").innerHTML=""; actinfo(op); setday(partyid,groupid,styles); }
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn