div圆角和颜色渐变的设置

复制代码
 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 5 <title>无标题文档</title>
 6     <style type="text/css">
 7     <!--
 8         #div1
 9         {
10             width:300px;
11             height:200px;
12             border:#ad0000 1px solid;
13             background-color:#39F;
14         }
15         #div1
16         {
17             -ms-border-radius:8px;
18             -moz-border-radius:8px;
19             -webkit-border-radius:8px;
20             -khtml-border-radius:8px;
21             -o-border-radius:8px;
22             border-radius:8px;
23         }
24         #div2
25         {
26             width:300px;
27             height:200px;
28             border:#ad0000 1px solid;
29         }
30         #div2
31         {
32             /*设置过渡效果*/
33             background-image:-moz-linear-gradient(top,#accff7,#4d94f4);  /*用于火狐浏览器*/
34             background-image:-webkit-gradient(linear,left top,left bottom,color-stop(0,#accff7),color-stop(1,#4d94f4)); /*用于Safari和Chrome浏览器*/
35             filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#accff7',endColorstr='#4d94f4',GradientType='0'); /*用于IE6 & IE7浏览器*/
36             background: -ms-linear-gradient(top,#accff7,#4d94f4);  /* CSS3 针对IE的写法。主要是IE10以前的版本不支持css3,所以对IE要写两个语句*/
37         }
38     -->
39     </style>
40 </head>
41 
42 <body>
43     <div id="div1">    </div>
44     <br />
45     <div id="div2"></div>
46 </body>
47 </html>
复制代码

 

posted on   华山青竹  阅读(454)  评论(0编辑  收藏  举报

编辑推荐:
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
· 【译】Visual Studio 中新的强大生产力特性
· 2025年我用 Compose 写了一个 Todo App

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5
点击右上角即可分享
微信分享提示