border-radius的兼容写法大全

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8" />
<title>border-radius的兼容写法大全</title>
<meta name="xing.org1^" content="xing.org1^(鋒丫头)" />
<style>
.image{
-webkit-border-image: url(images/news.png) 20/50px 67px 30px 10px repeat stretch;
-moz-border-image: url(images/news.png) 20/50px 67px 30px 10px repeat stretch;
-o-border-image: url(images/news.png) 20/50px 67px 30px 10px repeat stretch;
border-image: url(images/news.png) 20/50px 67px 30px 10px repeat stretch;
/*border-image: url(图片地址链接) slice/width outset repeat;*/
}
/*slice:边距数值:如果四个一样,就设置一个即可;如果四个不一样,就得设置四个,分别对应上右下左*/
/*width:必须与slice之间有一个/号,然后同slice一样,设置一个值也可,四个也可但要分别对应*/
/*outset(有两个值跟在width之后,可以都设置为repeat repeat一样,【这样的话就是也可以只设置一个值】也可以上下repeat左右stretch不一样。){*/
/*topbottom(上下){repeat(上下平铺);stretch(上下拉伸),round()}*/
/*leftright(左右){repeat(左右平铺);stretch(左右拉伸),round()}*/
/*stretch:默认值*/
/*round:将图像平铺显示,但是如果最后一幅图不能装下,会空出位置出来把能装下的背景图进行拉伸已达到铺满背景的效果 是repeat和stretch的结合.
}*/
div.radius{
width:600px;
height: 750px;
padding: 30px;
background-color: rgba(94, 70, 132, 0.87);
color: #fff;
font: 20px "微软雅黑";
-moz-border-radius-topleft: 12px;
-moz-border-radius-topright: 23px;
-moz-border-radius-bottomright: 34px;
-moz-border-radius-bottomleft: 45px;
-o-border-radius-topleft:12px;
-o-border-radius-topright:23px;
-o-border-radius-bottomright:34px;
-o-border-radius-bottomleft:45px;
-webkit-border-top-left-radius: 12px;
-webkit-border-top-right-radius: 23px;
-webkit-border-bottom-right-radius: 34px;
-webkit-border-bottom-left-radius: 45px;
border-top-left-radius: 12px;
border-top-right-radius: 23px;
border-bottom-right-radius: 34px;
border-bottom-left-radius: 45px;

}
</style>
</head>
<body>
<div class="image">用图片来做边框<br />border-image:url( ) 数值/宽度px stretch;</div>
<h1>绘制四个不同的圆角边框的写法以及不同的兼容性的写法大集合</h1>
<div class="radius">
<ul>
<li>顺序就是逆时针转圈</li>
<li></li>
<li>border-radius-topleft:12px;</li>
<li>border-radius-topright:23px;</li>
<li>border-radius-bottomright:34px;</li>
<li>border-radius-bottomleft:45px;</li>
<li></li>
<li>或者上面这个写法是错了,虽然书上这么讲,但是软件不这么提示。软件提示正确(在软件中更没有错误符号)如下</li>
<li></li>
<li>border-top-left-radiu:12px;</li>
<li>border-top-right-radius:23px;</li>
<li>border-bottom-right-radius:34px;</li>
<li>border-bottom-left-radius:45px;</li>
<li></li>
<li>-moz-border-radius-topleft:12px;</li>
<li>-moz-border-radius-topright:23px;</li>
<li>-moz-border-radius-bottomright:34px;</li>
<li>-moz-border-radius-bottomleft:45px;</li>
<li></li>
<li>-o-border-radius-topleft:12px;</li>
<li>-o-border-radius-topright:23px;</li>
<li>-o-border-radius-bottomright:34px;</li>
<li>-o-border-radius-bottomleft:45px;</li>
<li></li>
<li>-webkit-border-top-left-radius:12px;</li>
<li>-webkit-border-top-right-radius:23px;</li>
<li>-webkit-border-bottom-right-radius:45px;</li>
<li>-webkit-border-bottom-left-radius:34px;</li>
</ul>

</div>

<p>20160810 00:40-xing.org1^</P>
</body>
</html>

时间: 2024-08-24 00:10:32

border-radius的兼容写法大全的相关文章

background-size: contain 与cover的区别,以及ie78的兼容写法

一:background-size: contain 与cover的区别: 作用: 都是将图片以**相同宽高比**缩放以适应整个容器的宽高. 不同之处在于: 1.  在no-repeat情况下,如果容器宽高比与图片宽高比不同, cover:图片宽高比不变.铺满整个容器的宽高,而图片多出的部分则会被截掉: contain:图片自身的宽高比不变,缩放至图片自身能完全显示出来,所以容器会有留白区域: PS:其实,从英文的意思来说:cover意味着“遮罩.遮盖”---此处理解为“塞满”较恰当,conta

CSS兼容问题大全

1.chorme 最小字体的兼容性. 问题描述:ff和IE最小字体可设置为1px,可是chorme中文版最小字体是12px,小于12px的字体全部显示为12px.解决方案:chorme支持CSS3的,可用 font-size : 12px; -webkit-transform : scale(0.84,0.84) ; *font-size:10px;来解决,但是会发现整个容器都缩小了,变得不对齐了,再配合margin可解决 2.IE8及以下显示图片时多出一个边框而Chrome或Firefox下却

map() 和 forEach() 区别 兼容写法

兼容写法: 不管是forEach还是map在IE6-8下都不兼容(不兼容的情况下在Array.prototype上没有这两个方法),那么需要我们自己封装一个都兼容的方法,代码如下: /** * forEach遍历数组 * @param callback [function] 回调函数: * @param context [object] 上下文: */ Array.prototype.myForEach = function myForEach(callback,context){ contex

常用原生JS兼容写法

在我们前端开发中,经常会遇到兼容性的问题,因为要考虑用户会使用不同的浏览器来访问你的页面,你要保证你做的网页在任何一个浏览器中都能正常的运行,下面我就举几个常用原生JS的兼容写法: 1:添加事件方法 addHandler:function(element,type,handler){  if(element.addEventListener){//检测是否为DOM2级方法   element.addEventListener(type, handler, false);  }else if (e

javascript获取行间样式和非行间样式--兼容写法

style:获取行间样式: currentStyle:获取计算后的样式,也叫当前样式.最终样式. 优点:可以获取元素的最终样式,包括浏览器的默认值,而不像style只能获取行间样式,所以更常用到.注意:不能获取复合样式如background属性值,只能获取单一样式如background-color等. alert (oAbc.currentStyle);IE8和Opera 11弹出了“object CSSStyleDeclaration”:FF 12.chrome 14.safari 5则弹出“

JavaScript中的数组遍历forEach()与map()方法以及兼容写法

原理: 高级浏览器支持forEach方法 语法:forEach和map都支持2个参数:一个是回调函数(item,index,list)和上下文: forEach:用来遍历数组中的每一项:这个方法执行是没有返回值的,对原来数组也没有影响: 数组中有几项,那么传递进去的匿名回调函数就需要执行几次: 每一次执行匿名函数的时候,还给其传递了三个参数值:数组中的当前项item,当前项的索引index,原始数组input: 理论上这个方法是没有返回值的,仅仅是遍历数组中的每一项,不对原来数组进行修改:但是我

CSS3之flex兼容写法

很久不写博文,之前的长时间不上都关闭了,但随着工作时间长越来越长,对知识的积累和总结还真的是很重要的.所以奉劝码农们每天都还是要抽出来一点时间总结点东西,以后对你受益匪浅!!今天还是变谈CSS3里的flex怎么处理兼容的 flex是个非常好用的属性,如果说有什么可以完全代替 float 和 position ,那么肯定是非它莫属了,虽然现在低版本浏览器不支持,可是对于移动来说兼容性不是问题,可是在安卓4.3以后版本里.那就不好用了,今天咱们就说下如果写flex才能保证兼容性. flex之所以有兼

currentStyle和getComputedStyle的兼容写法

今天学习javascript的时候,教程中介绍了一种简单实现jQuery 中css()方法的写法 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style> #div{ width: 200px; height: 200px; background: re

opacity兼容写法

1 .opacity{ 2 position: absolute; 3 top: 0px;left: 0px; 4 background: #000; 5 filter:alpha(opacity=50); /* IE */ 6 -moz-opacity:0.5; /* 老版Mozilla */ 7 -khtml-opacity:0.5; /* 老版Safari */ 8 opacity: 0.5; /* 支持opacity的浏览器*/ 9 } Js写法 1 object.filter = "a