用户注册



邮箱:

密码:

用户登录


邮箱:

密码:
记住登录一个月忘记密码?

发表随想


还能输入:200字
云代码 - css代码库

ToolTips CSS提示框

2014-03-30 作者: IT技术宅举报

[css]代码库

<!DOCTYPE>
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>ToolTips Example</title>
		<style type="text/css">
		.tooltip {
			border-bottom: 1px dotted #000000; color: #000000; outline: none;
			cursor: help; text-decoration: none;
			position: relative;
		}
		.tooltip span {
			margin-left: -999em;
			position: absolute;
		}
		.tooltip:hover span {
			border-radius: 5px 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px; 
			box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.1); -webkit-box-shadow: 5px 5px rgba(0, 0, 0, 0.1); -moz-box-shadow: 5px 5px rgba(0, 0, 0, 0.1);
			font-family: Calibri, Tahoma, Geneva, sans-serif;
			position: absolute; left: 1em; top: 2em; z-index: 99;
			margin-left: 0; width: 250px;
		}
		.tooltip:hover img {
			border: 0; margin: -10px 0 0 -55px;
			float: left; position: absolute;
		}
		.tooltip:hover em {
			font-family: Candara, Tahoma, Geneva, sans-serif; font-size: 1.2em; font-weight: bold;
			display: block; padding: 0.2em 0 0.6em 0;
		}
		.classic { padding: 0.8em 1em; }
		.custom { padding: 0.5em 0.8em 0.8em 2em; }
		* html a:hover { background: transparent; }
		.classic {background: #FFFFAA; border: 1px solid #FFAD33; }
		.critical { background: #FFCCAA; border: 1px solid #FF3334;	}
		.help { background: #9FDAEE; border: 1px solid #2BB0D7;	}
		.info { background: #9FDAEE; border: 1px solid #2BB0D7;	}
		.warning { background: #FFFFAA; border: 1px solid #FFAD33; }
		</style>
	</head>
	<body>
		<h1>Examples of CSS ToolTips!</h1>
		<p>Here are some examples of a 
        <a class="tooltip" href="#">Classic<span class="classic">
        This is just an example of what you can do using a CSS tooltip, 
        feel free to get creative and produce your own!</span></a>,
         <a class="tooltip" href="#">Critical<span class="custom critical">
         <img src="Critical.png" alt="Error" height="48" width="48" />
         <em>Critical</em>
         This is just an example of what you can do using a CSS tooltip, 
         feel free to get creative and produce your own!
         </span></a>,
          <a class="tooltip" href="#">Help<span class="custom help">
          <img src="Help.png" alt="Help" height="48" width="48" />
          <em>Help</em>
          This is just an example of what you can do using a CSS tooltip,
           feel free to get creative and produce your own!
          </span></a>, 
          <a class="tooltip" href="#">Information<span class="custom info">
          <img src="Info.png" alt="Information" height="48" width="48" />
          <em>Information</em>
          This is just an example of what you can do using a CSS tooltip,
           feel free to get creative and produce your own!
          </span></a> and 
          <a class="tooltip" href="#">Warning<span class="custom warning">
          <img src="Warning.png" alt="Warning" height="48" width="48" />
          <em>Warning</em>
          This is just an example of what you can do using a CSS tooltip,
           feel free to get creative and produce your own!
          </span></a> 
          CSS powered tooltip.
           This is just an example of what you can do so feel free to get creative and produce your own!</p>

	</body>
</html>

[代码运行效果截图]


ToolTips  CSS提示框


网友评论    (发表评论)


发表评论:

评论须知:

  • 1、评论每次加2分,每天上限为30;
  • 2、请文明用语,共同创建干净的技术交流环境;
  • 3、若被发现提交非法信息,评论将会被删除,并且给予扣分处理,严重者给予封号处理;
  • 4、请勿发布广告信息或其他无关评论,否则将会删除评论并扣分,严重者给予封号处理。


扫码下载

加载中,请稍后...

输入口令后可复制整站源码

加载中,请稍后...