用户控件,鼠标经过时,背景颜色透明的问题。---标题长点,容易引起注意。--- 本帖最后由 net_lover 于 2012-04-28 11:28:38 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 代码就是, 鼠标经过控件,按下控件,释放控件的时候,把控件的BackgroundImage 属性换一下。 没有其他操作。 试试这个 $(document).ready(function () { $("#text1").mousemove(function () { $("#text1").attr("style", "height:150px; width:250px;background-image:url(http://www.google.com.hk/intl/zh-CN/images/logo_cn.png)"); }); $("#text1").mousedown(function () { $("#text1").attr("style", "height:150px; width:250px;background-image:url(http://www.sogou.com/images/logo_l.gif)"); }); $("#text1").mouseout(function () { $("#text1").attr("style", "height:150px; width:250px;background-image:url(http://soso.qstatic.com/30d/img/logo/logo_index.png)"); }); }); <html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>ceshi</title> <script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script></head><body> <div> <input type="text" style="height:150px; width:250px; background-image:url(http://www.baidu.com/img/baidu_sylogo1.gif)" id="text1" /> </div></body></html> C#学习笔记 远程数据备份,会的帮下忙 如何知道,用户是不是曾经按下键盘 Image控件显示图片 c# 撤销与重做的实现 父窗体调用子窗体内的一个方法,方法改变一个文本框的值(反射) 190分求一个简单的问题 C#怎样处理输入字符的异常 自定义事件没有触发的问题 为什么不能上传? winform中的treeview中拖动一个节点到另一个位置,松开鼠标后怎么将鼠标定位在你拖动的这个节点上 ConnectionString 属性尚未初始化。求大神帮助~~
$(document).ready(function () { $("#text1").mousemove(function () {
$("#text1").attr("style", "height:150px; width:250px;background-image:url(http://www.google.com.hk/intl/zh-CN/images/logo_cn.png)");
});
$("#text1").mousedown(function () {
$("#text1").attr("style", "height:150px; width:250px;background-image:url(http://www.sogou.com/images/logo_l.gif)");
});
$("#text1").mouseout(function () {
$("#text1").attr("style", "height:150px; width:250px;background-image:url(http://soso.qstatic.com/30d/img/logo/logo_index.png)");
});
});
<head runat="server">
<title>ceshi</title>
<script src="../../Scripts/jquery-1.4.1.min.js" type="text/javascript"></script></head>
<body>
<div>
<input type="text" style="height:150px; width:250px; background-image:url(http://www.baidu.com/img/baidu_sylogo1.gif)" id="text1" />
</div>
</body>
</html>