关闭

css3 的 border-image

标签: csscss3border-image边框图片
462人阅读 评论(0) 收藏 举报
<!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" />
<style>
	div{
		width:300px;
		border:20px solid transparent;	
		padding:10px 20px;
	}
	.round{
		-moz-border-image:url(border.png) 30 30 round;	/* Old Firefox */
		-webkit-border-image:url(border.png) 30 30 round;	/* Safari and Chrome */
		-o-border-image:url(border.png) 30 30 round;		/* Opera */
		border-image: url(border.png) round 30 30;	
	}
	.stretch{
		-moz-border-image:url(border.png) 30 30 stretch;	/* Old Firefox */
		-webkit-border-image:url(border.png) 30 30 stretch;	/* Safari and Chrome */
		-o-border-image:url(border.png) 30 30 stretch;	/* Opera */
		border-image: url(border.png) stretch 30 30;
	}
</style>
<title>无标题文档</title>
</head>
<body>
<div class="round">round的效果,图片充满边框</div>
<br>
<div class="stretch">stretch的效果,图片拉伸填充</div>
</body>
</html>


注意:border-image不支持ie浏览器


效果图

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:173459次
    • 积分:3194
    • 等级:
    • 排名:第11130名
    • 原创:141篇
    • 转载:51篇
    • 译文:1篇
    • 评论:21条
    文章分类
    最新评论