码迷,mamicode.com
首页 > Web开发 > 详细

css3 border-image

时间:2017-02-25 19:53:03      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:over   sprite   yellow   etc   color   png   border   input   ret   

<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			#stretch {
				border: 15px solid transparent;
				width: 300px;
				border-image-source: url(img/isux.png);
				border-image-slice: 20%;
				border-width: 10px;
				border-image-repeat: round;
				/* round  repeat  Stretch*/
			}
			
			.border-image-btn {
				border: 18px solid green;
				border-width: 0 18px;
				-webkit-border-image: url("img/button_sprite.png") 0 18 50 18;
				-moz-border-image: url("img/button_sprite.png") 0 18 50 18;
				-o-border-image: url("img/button_sprite.png") 0 18 50 18;
				border-image: url("img/button_sprite.png") 0 18 50 18;
				padding: 13px 10px 17px;
				font-size: 16px;
				color: #fff;
				font-weight: bold;
				text-decoration: none;
				line-height: 15px;
			}
			
			.border-image-btn:hover {
				-webkit-border-image: url("img/button_sprite.png") 50 18 0 18;
				-moz-border-image: url("img/button_sprite.png) 50 18 0 18;
				-o-border-image: url("img/button_sprite.png") 50 18 0 18;
				border-image: url("img/button_sprite.png") 50 18 0 18;
				color: #000;
				border-color: yellow;
				text-decoration: none;
			}
			
			
		</style>
	</head>

	<body>
		<input type="button" name="" id="" class="border-image-btn" value="测 试" />
		<div id="stretch">
			asd
		</div>
	</body>

</html>

  

css3 border-image

标签:over   sprite   yellow   etc   color   png   border   input   ret   

原文地址:http://www.cnblogs.com/lgjc/p/6442453.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!