<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<script src="js/Jquery.js"></script>
<style type="text/css">
<!--
#main {
position:absolute;
left:100px;
top:100px;
width:68px;
height:68px;
z-index:1;
}
#main div{
cursor:pointer;
}
#app {
position:relative;
left:19px;
top:19px;
width:24px;
height:24px;
z-index:9;
background-color:e9ecfb;
border:#cccccc 1px solid;
display:none;
filter:alpha(opacity=30);
float:inherit;
}
.m_app {
position:relative;
left:19px;
top:19px;
width:24px;
height:24px;
z-index:9;
background-color:e9ecfb;
border:#cccccc 1px solid;
}
.m_div{
width:32px;
height:32px;
z-index:2;
border:#E1E1E1 1px solid;
position:relative;
background-color:#f5f5f5;
}
#icon_1 {
left:0px;
top:-32px;
z-index:2;
float:left;
/* background:url(images/1.gif) no-repeat center;*/
}
#icon_2 {
right:0px;
top:-32px;
float:right;
/* background:url(images/2.gif) no-repeat center;*/
}
#icon_3 {
left:0px;
top:-32px;
float:left;
/* background:url(images/3.gif) no-repeat center;*/
}
#icon_4 {
right:0px;
top:-32px;
float:right;
/* background:url(images/4.gif) no-repeat center;*/
}
-->
</style>
</head>
<body>
<div id="main">
<div id="app"></div>
<div id="icon_panel" style="display:none; left:0px; top:0px; position:absolute; z-index:5; width:68px; height:68px; float:left;">
<div class="m_app"></div>
<div id="icon_1" class="m_div"><img src="images/1.gif" /></div>
<div id="icon_2" class="m_div"><img src="images/2.gif" /></div>
<div id="icon_3" class="m_div"><img src="images/3.gif" /></div>
<div id="icon_4" class="m_div"><img src="images/4.gif" /></div>
</div>
</div>
<p id="con">
韩红,生于西藏昌都,祖籍山东德州,全国政协委员、全国青联常委、中华海外联谊会理事。父亲为汉族知青,母亲为藏族。她是中国大陆女歌手,创作型唱将。2003年后,韩红逐渐受到关注,多次获得各种“年度最受欢迎女歌手奖”和“最佳女歌手奖”,成为中国大陆最红的女歌手之一。韩红于2009年加入空军政治部文工团,任空军政治部文工团副团长,军衔为大校。所支持的歌迷多认为她的声线如莎拉·布莱曼的天籁般,其词曲风格独具;但对其反感者则多认为她风格造作。</p>
<div id="msg"></div>
<script>
var msg_app = function(app_icon, obj) {
var s_txt = "";
obj = obj || document;
var SelectText = function() {
var txt = "";
if(document.selection) {
txt = document.selection.createRange().text; // IE
} else {
txt = document.getSelection();
}
return txt.toString();
};
obj.onmouseup = function(e) {
e = e || window.event;
var txt = SelectText(), sh = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
var left = (e.clientX - 20 < 0) ? e.clientX + 20 : e.clientX - 20, top = (e.clientY - 20 < 0) ? e.clientY + sh + 20 : e.clientY + sh - 20;
s_txt = txt;
if (txt) {
$("#main").css({"left":left + "px","top":top + "px"});
$(app_icon).show();
} else {
$("#icon_panel").hide();
$(app_icon).hide();
}
};
//分享点击事件
// app_icon.onclick = function() {
// var txt = s_txt;
// if(!txt)
// txt = SelectText();
// if (txt) {
// window.open('http://v.t.sina.com.cn/share/share.php?title=' + txt);
// }
// };
//*******************************************/
$(app_icon).mouseenter(function() {
$("#icon_panel").fadeIn("fast");
$(this).hide();
});
$("#icon_panel").mouseleave(function() {
$("#icon_panel").fadeOut("fast",function(){
$(app_icon).show();
$(app_icon).animate({
opacity: '0.3'
}, 300);
});
});
};
msg_app(document.getElementById("app"));
</script>
</body>
</html>
<html xmlns=" http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>test</title>
<script src="js/Jquery.js"></script>
<style type="text/css">
<!--
#main {
position:absolute;
left:100px;
top:100px;
width:68px;
height:68px;
z-index:1;
}
#main div{
cursor:pointer;
}
#app {
position:relative;
left:19px;
top:19px;
width:24px;
height:24px;
z-index:9;
background-color:e9ecfb;
border:#cccccc 1px solid;
display:none;
filter:alpha(opacity=30);
float:inherit;
}
.m_app {
position:relative;
left:19px;
top:19px;
width:24px;
height:24px;
z-index:9;
background-color:e9ecfb;
border:#cccccc 1px solid;
}
.m_div{
width:32px;
height:32px;
z-index:2;
border:#E1E1E1 1px solid;
position:relative;
background-color:#f5f5f5;
}
#icon_1 {
left:0px;
top:-32px;
z-index:2;
float:left;
/* background:url(images/1.gif) no-repeat center;*/
}
#icon_2 {
right:0px;
top:-32px;
float:right;
/* background:url(images/2.gif) no-repeat center;*/
}
#icon_3 {
left:0px;
top:-32px;
float:left;
/* background:url(images/3.gif) no-repeat center;*/
}
#icon_4 {
right:0px;
top:-32px;
float:right;
/* background:url(images/4.gif) no-repeat center;*/
}
-->
</style>
</head>
<body>
<div id="main">
<div id="app"></div>
<div id="icon_panel" style="display:none; left:0px; top:0px; position:absolute; z-index:5; width:68px; height:68px; float:left;">
<div class="m_app"></div>
<div id="icon_1" class="m_div"><img src="images/1.gif" /></div>
<div id="icon_2" class="m_div"><img src="images/2.gif" /></div>
<div id="icon_3" class="m_div"><img src="images/3.gif" /></div>
<div id="icon_4" class="m_div"><img src="images/4.gif" /></div>
</div>
</div>
<p id="con">
韩红,生于西藏昌都,祖籍山东德州,全国政协委员、全国青联常委、中华海外联谊会理事。父亲为汉族知青,母亲为藏族。她是中国大陆女歌手,创作型唱将。2003年后,韩红逐渐受到关注,多次获得各种“年度最受欢迎女歌手奖”和“最佳女歌手奖”,成为中国大陆最红的女歌手之一。韩红于2009年加入空军政治部文工团,任空军政治部文工团副团长,军衔为大校。所支持的歌迷多认为她的声线如莎拉·布莱曼的天籁般,其词曲风格独具;但对其反感者则多认为她风格造作。</p>
<div id="msg"></div>
<script>
var msg_app = function(app_icon, obj) {
var s_txt = "";
obj = obj || document;
var SelectText = function() {
var txt = "";
if(document.selection) {
txt = document.selection.createRange().text; // IE
} else {
txt = document.getSelection();
}
return txt.toString();
};
obj.onmouseup = function(e) {
e = e || window.event;
var txt = SelectText(), sh = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0;
var left = (e.clientX - 20 < 0) ? e.clientX + 20 : e.clientX - 20, top = (e.clientY - 20 < 0) ? e.clientY + sh + 20 : e.clientY + sh - 20;
s_txt = txt;
if (txt) {
$("#main").css({"left":left + "px","top":top + "px"});
$(app_icon).show();
} else {
$("#icon_panel").hide();
$(app_icon).hide();
}
};
//分享点击事件
// app_icon.onclick = function() {
// var txt = s_txt;
// if(!txt)
// txt = SelectText();
// if (txt) {
// window.open('http://v.t.sina.com.cn/share/share.php?title=' + txt);
// }
// };
//*******************************************/
$(app_icon).mouseenter(function() {
$("#icon_panel").fadeIn("fast");
$(this).hide();
});
$("#icon_panel").mouseleave(function() {
$("#icon_panel").fadeOut("fast",function(){
$(app_icon).show();
$(app_icon).animate({
opacity: '0.3'
}, 300);
});
});
};
msg_app(document.getElementById("app"));
</script>
</body>
</html>