CSS3新增UI样式_html/css_WEB-ITnose
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Lepaskan: 2016-06-24 11:35:34
asal
1202 orang telah melayarinya
- 圆角,border-radius: 1-4个数字/1-4个数字,前面是水平,后面是垂直,不给“/”表示水平和垂直一样,举例如下:
-
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title> <style><br /> // 如果是两个数字,则左上角和右下角一样,右上角和左下角一样 .box{width:200px;height:200px;border:1px solid #000; border-radius:20px;} </style></head><body> <div class="box"></div></body>
Salin selepas log masuk
-
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title> <style> // 100px/150px表示每个角的水平和垂直,同时可以前面四个/后面四个,则分别表示四个角的水平和四个角的垂直 .box{width:200px;height:300px;border:1px solid #000;border-radius:100px/150px;} </style></head><body> <div class="box"></div></body>
Salin selepas log masuk
- 边框背景
-
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title><style> .box{width:200px;height:60px; -webkit-border-image:url(bt_blue.png) 0 10;border-left-width:10px;border-right-width:10px;}</style></head><body> <div class="box"></div></body>
Salin selepas log masuk
- 线性渐变
<head> <meta http-equiv="Content-Type" content="textml; charset=utf-8"> <title>无标题文档</title><style> .box{width:300px;height:300px;border:10px solid #000; background-image:-webkit-linear-gradient(60deg,red,blue);}</style></head><body> <div class="box"></div></body>
Salin selepas log masuk
- 可以设置多个背景
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>无标题文档</title> <style> .box{width:300px;height:300px;background:url(bt_blue.png) no-repeat, url(border.png) repeat-y right 0;} </style></head><body> <div class="box"></div></body>
Salin selepas log masuk
- border-image:边框图片
- border-image-source: 引入图片
- border-image-slice: 切割图片
- border-image-width: 边框宽度
- border-image-repeat: 图片的排列方式(round 平铺, repeat 重复, stretch 拉伸)
- border-colors:边框颜色
- 背景尺寸: background-size: x, y (100% 100%)
- background-origin: border | padding | content -box,分别表示从border区域开始显示背景,从padding区域开始显示背景,从content区域开始显示背景
- border-clip : border(从border区域向外裁剪背景), padding(从padding区域向外裁剪背景),content(从content区域向外裁剪背景)
- 遮罩
Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn
Artikel terbaru oleh pengarang
-
2025-02-26 03:58:14
-
2025-02-26 03:38:10
-
2025-02-26 03:17:10
-
2025-02-26 02:49:09
-
2025-02-26 01:08:13
-
2025-02-26 00:46:10
-
2025-02-25 23:42:08
-
2025-02-25 22:50:13
-
2025-02-25 21:54:11
-
2025-02-25 20:45:11
Isu terkini
-
2025-03-26 14:09:44
-
2025-03-26 14:04:41
-
2025-03-26 13:57:46
-
2025-03-26 13:56:42
-
2025-03-26 13:55:33
Topik-topik yang berkaitan
Lagi>