分享好友 前端技术首页 频道列表

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

css教程  2023-02-08 17:000

1. 固定的顶部工具栏

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 #banner {
02 positionfixed;
03 height60px;
04 width100%;
05 top0;
06 left0;
07 border-top5px solid #a1cb2f;
08 background#fff;
09 -moz-box-shadow: 0 2px 3px 0px rgba(0000.16);
10 -webkit-box-shadow: 0 2px 3px 0px rgba(0000.16);
11 box-shadow: 0 2px 3px 0px rgba(0000.16);
12 z-index999999;
13 }
14  
15 #banner h1 {
16     line-height60px;
17 }

 

2. 下列式导航菜单

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 #bar { displayblockheight45pxbackground#22385apadding-top5pxmargin-bottom150pxpositionrelative; }
02 #bar ul { margin0px15pxfont-family: Candara, Calibri, "Segoe UI", Segoe, Arialsans-serif; }
03 #bar ul li {  background#22385adisplayblockfont-size1.2empositionrelativefloatleft; }
04 #bar ul li a {
05 displayblock;
06 color#fffff7;
07 line-height45px;
08 font-weightbold;
09 padding0px10px;
10 text-decorationnone;
11 z-index9999;
12 }
13  
14 #bar ul li a:hover, #bar ul li a.selected {
15 color#365977;
16 background#fff;
17 border-top-left-radius: 3px;
18 border-top-right-radius: 3px;
19 -webkit-border-top-left-radius: 3px;
20 -webkit-border-top-right-radius: 3px;
21 -moz-border-radius-topleft: 3px;
22 -moz-border-radius-topright: 3px;
23 }
24  
25 #bar ul .subnav {
26 displayblock;
27 left14px;
28 top48px;
29 z-index-1;
30 width500px;
31 positionabsolute;
32 height90px;
33 border1px solid #edf0f3;
34 border-top0;
35 padding10px 0 10px10px;
36 overflowhidden;
37 -moz-border-radius-bottomleft: 3px;
38 -moz-border-radius-bottomleft: 3px;
39 -webkit-border-bottom-left-radius: 3px;
40 -webkit-border-bottom-right-radius: 3px;
41 border-bottom-right-radius: 3px;
42 border-bottom-right-radius: 3px;
43 -moz-box-shadow: 0px 2px 7px rgba(0,0,0,0.25);
44 -webkit-box-shadow: 0px 2px 7px rgba(0,0,0,0.25);
45 box-shadow: 0px 2px 7px rgba(0,0,0,0.25);
46 -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=180, Color='#333333')";
47 filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=180, Color='#333333');
48 }

3. 带光泽阴影按钮

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 blues {
02 color#fff;
03 width190px;
04 height35px;
05 cursorpointer;
06 font-familyArialTahomasans-serif;
07 font-size1.0em;
08 font-weightbold;
09 -moz-border-radius: 2px;
10 -webkit-border-radius: 2px;
11 border-radius: 2px;
12 border-width1px;
13 border-color#0053a6 #0053a6 #000;
14 background-color#6891e7;
15 background-image: -moz-linear-gradient(top,#4495e7 0#0053a6 100%);
16 background-image: -ms-linear-gradient(top,#4495e7 0#0053a6 100%);
17 background-image: -o-linear-gradient(top,#4495e7 0#0053a6 100%);
18 background-image: -webkit-gradient(linear,left top,leftbottom,color-stop(0#4495e7),color-stop(100%#0053a6));
19 background-image: -webkit-linear-gradient(top,#4495e7 0,#0053a6 100%);
20 background-image: linear-gradient(to bottom,#4495e7 0,#0053a6 100%);
21 text-shadow1px 1px 0 rgba(000, .6);
22 -moz-box-shadow: inset 0 1px 0 rgba(256256256, .35);
23 -ms-box-shadow: inset 0 1px 0 rgba(256256256, .35);
24 -webkit-box-shadow: inset 0 1px 0 rgba(256256256, .35);
25 box-shadow: inset 0 1px 0 rgba(256256256, .35);
26 filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#4495e7,EndColorStr=#0053a6);
27 }
28  
29 .blues:hover {
30 border-color#002d59 #002d59 #000;
31 -moz-box-shadow: inset 0 1px 0 rgba(2562562560.55), 1px 1px 3pxrgba(0000.25);
32 -ms-box-shadow: inset 0 1px 0 rgba(2562562560.55), 1px 1px 3pxrgba(0000.25);
33 -webkit-box-shadow: inset 0 1px 0 rgba(2562562560.55), 1px 1px 3pxrgba(0000.25);
34 box-shadow: inset 0 1px 0 rgba(2562562560.55), 1px 1px 3pxrgba(000, .25);
35 filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#3a8cdf,EndColorStr=#0053a6);
36 background-image: -moz-linear-gradient(top,#3a8cdf 0,#0053a6 100%);
37 background-image: -ms-linear-gradient(top,#3a8cdf 0,#0053a6 100%);
38 background-image: -o-linear-gradient(top,#3a8cdf 0,#0053a6 100%);
39 background-image: -webkit-gradient(linear,left top,leftbottom,color-stop(0,#3a8cdf),color-stop(100%,#0053a6));
40 background-image: -webkit-linear-gradient(top,#3a8cdf 0,#0053a6 100%);
41 background-image: linear-gradient(to bottom,#3a8cdf 0,#0053a6 100%);
42 }
43  
44 .blues:active {
45 border-color#000 #002d59 #002d59;
46 -moz-box-shadow: inset 0 1px 3px rgba(0,0,0,0.2),0 1px 0 #fff;
47 -ms-box-shadow: inset 0 1px 3px rgba(0,0,0,0.2),0 1px 0 #fff;
48 -webkit-box-shadow: inset 0 1px 3px rgba(0,0,0,0.2),0 1px 0 #fff;
49 box-shadow: inset 0 1px 3px rgba(0,0,0,0.2),0 1px 0 #fff;
50 filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr=#005ab4,EndColorStr=#175ea6);
51 background-image: -moz-linear-gradient(top,#005ab4 0,#175ea6 100%);
52 background-image: -ms-linear-gradient(top,#005ab4 0,#175ea6 100%);
53 background-image: -o-linear-gradient(top,#005ab4 0,#175ea6 100%);
54 background-image: -webkit-gradient(linear,left top,leftbottom,color-stop(0,#005ab4),color-stop(100%,#175ea6));
55 background-image: -webkit-linear-gradient(top,#005ab4 0,#175ea6 100%);
56 background-image: linear-gradient(to bottom,#005ab4 0,#175ea6 100%);
57 }

 

4. 弹出通知栏

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

 

代码:

01 .flyout {
02 width310px;
03 margin-top10px;
04 font-size11px;
05 positionrelative;
06 font-family'Lucida Grande'TahomaVerdanaArialsans-serif;
07 background-colorwhite;
08 padding9px 11px;
09 background: rgba(2552552550.9);
10 border1px solid #c5c5c5;
11 -webkit-box-shadow: 0 3px 8px rgba(000, .25);
12 -moz-box-shadow: 0 3px 8px rgba(000, .25);
13 box-shadow: 0 3px 8px rgba(000, .25);
14 -webkit-border-radius: 3px;
15 -moz-border-radius: 3px;
16 border-radius: 3px;
17 }
18  
19 .flyout #tip {
20 background-imageurl('images/tip.png');
21 background-repeatno-repeat;
22 background-sizeauto;
23 height11px;
24 positionabsolute;
25 top-11px;
26 left25px;
27 width20px;
28 }
29  
30 .flyout h2 {
31 text-transformuppercase;
32 color#666;
33 font-size1.2em;
34 padding-bottom5px;
35 margin-bottom12px;
36 border-bottom1px solid #dcdbda;
37 }
38 .flyout p { padding-bottom25pxfont-size1.1emcolor#222; }

 

5. 苹果页面包装

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 .applewrap {
02 width100%;
03 displayblock;
04 height150px;
05 backgroundwhite;
06 border1px solid;
07 border-color#e5e5e5 #dbdbdb #d2d2d2;
08 -webkit-border-radius: 4px;
09 -moz-border-radius: 4px;
10 border-radius: 4px;
11 -webkit-box-shadow: rgba(0000.30 1px 3px;
12 -moz-box-shadow: rgba(0,0,0,0.30 1px 3px;
13 box-shadow: rgba(0000.30 1px 3px;
14 }
15  
16  
17 .applewrap .col {
18 floatleft;
19 box-sizing: border-box;
20 width250px;
21 height150px;
22 padding16px 7px 6px 22px;
23 font12px/18px"Lucida Grande""Lucida Sans Unicode"HelveticaArialVerdanasans-serif;
24 color#343434;
25 border-right1px solid #dadada;
26 }

 

6. 苹果内容框效果

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

 

 

代码:

01 .applebox {
02 widthauto;
03 height85px;
04 box-sizing: border-box;
05 background#f5f5f5;
06 padding20px 20px 10px;
07 margin10px 0 20px;
08 border1px solid #ccc;
09 border-radius: 4px;
10 -webkit-border-radius: 4px;
11 -moz-border-radius: 4px;
12 -o-border-radius: 4px;
13 -webkit-box-shadow: inset 0px 1px 1px rgba(000, .3);
14 -moz-box-shadow: inset 0px 1px 1px rgba(000, .3);
15 box-shadow: inset 0px 1px 1px rgba(000, .3);
16 }
17  
18 .applebox .col {
19 width140px;
20 floatleft;
21 margin0 0 0 30px;
22 }

 

7. 精选链接

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 .applefeature {
02 height150px;
03 margin8px;
04 vertical-aligntop;
05 display: inline-block;
06 }
07  
08 .applefeature a {
09 displayblock;
10 width168px;
11 height140px;
12 border1px solid #ccc;
13 color#333;
14 text-decorationnone;
15 font-weightbold;
16 line-height1.3em;
17 background#f7f7f7;
18 -webkit-box-shadow: inset 0 1px 2px rgba(000, .3);
19 -moz-box-shadow: inset 0 1px 2px rgba(000, .3);
20 box-shadow: inset 0 1px 2px rgba(000, .3);
21 -webkit-border-radius: 4px;
22 -moz-border-radius: 4px;
23 border-radius: 4px;
24 }
25 .applefeature a:hover {
26 background#fafafa;
27 background: -webkit-gradient(linear, 0% 0%0% 100%, from(#fff), to(#f7f7f7));
28 background: -moz-linear-gradient(100% 100% 90deg, #f7f7f7#fff);
29 -webkit-box-shadow: inset 0 1px 2pxrgba(0,0,0,.3);
30 -moz-box-shadow: inset 0 1px 2pxrgba(0,0,0,.3);
31 box-shadow: inset 0 1px 2px rgba(0,0,0,.3);
32 -webkit-border-radius: 4px;
33 -moz-border-radius: 4px;
34 border-radius: 4px;
35 }
36  
37 .applefeature a img {
38 displayblock;
39 margin26px auto 4px;
40 }
41 .applefeature a h4 {
42 displayblock;
43 width160px;
44 font-size1.3em;
45 font-familyArialTahomasans-serif;
46 color#646464;
47 text-aligncenter;
48 }

 

8. 帧内图片

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 .wpframe {
02 background#fff;
03 border-radius: 2px;
04 -webkit-border-radius: 2px;
05 -moz-border-radius: 2px;
06 padding8px;
07 -webkit-box-shadow: 1px 2px 1px #d1d1d1;
08 -moz-box-shadow: 1px 2px 1px #d1d1d1;
09 box-shadow: 1px 2px 1px #d1d1d1;
10 }

 

9. 具有焦点亮度效果的文本框

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

 

代码:

01 .formwrap { displayblockmargin-bottom15px; }
02 .formwrap label {
03 display: inline-block;
04 width80px;
05 font-size11px;
06 font-weightbold;
07 color#444;
08 font-familyArialTahomasans-serif;
09 }
10  
11 .formwrap .shadowfield {
12 positionrelative;
13 width250px;
14 font-size17px;
15 font-family"Helvetica Neue"Arialsans-serif;
16 font-weightnormal;
17 background#f7f8f8;
18 color#7c7c7c;
19 line-height1.4;
20 padding6px 12px;
21 outlinenone;
22 transition: all 0.2s ease-in-out 0s;
23 -webkit-transition: all 0.2s ease-in-out 0s;
24 -moz-transition: all 0.2s ease-in-out 0s;
25 border1px solid #ad9c9c;
26 border-radius: 6px 6px 6px 6px;
27 box-shadow: 0 1px rgba(3425250.2inset0 1px #fff;
28 }
29 .formwrap .shadowfield:focus {
30 border-color#930;
31 background#fff;
32 color#5d5d5d;
33 box-shadow: inset 0 1px rgba(3425250.2), 0 1px rgba(2552552550.6), 00 7px rgba(23582820.5);
34 -moz-box-shadow: inset 0 1px rgba(3425250.2), 0 1pxrgba(2552552550.6), 0 0 7px rgba(23582820.5);
35 -webkit-box-shadow: inset 0 1px rgba(3425250.2), 0 1pxrgba(2552552550.6), 0 0 7px rgba(23582820.5);
36 }

 

10. 弹性阴影按钮

 

网页设计:使用 CSS3 Box Shadow 实现的 10 个创新技术

在线演示

代码:

01 .blu-btn {
02 display: inline-block;
03 -moz-border-radius: .25em;
04 border-radius: .25em;
05 -webkit-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.2);
06 -moz-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.2);
07 box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.2);
08 background-color#276195;
09 background-image: -moz-linear-gradient(#3c88cc,#276195);
10 background-image: -ms-linear-gradient(#3c88cc,#276195);
11 background-image: -webkit-gradient(linear,left top,leftbottom,color-stop(0%,#3c88cc),color-stop(100%,#276195));
12 background-image: -webkit-linear-gradient(#3c88cc,#276195);
13 background-image: -o-linear-gradient(#3c88cc,#276195);
14 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3c88cc',endColorstr='#276195',GradientType=0);
15 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#3c88cc', endColorstr='#276195', GradientType=0)";
16 background-image: linear-gradient(#3c88cc,#276195);
17 border0;
18 cursorpointer;
19 color#fff;
20 text-decorationnone;
21 text-aligncenter;
22 font-size16px;
23 padding0px 20px;
24 height40px;
25 line-height40px;
26 min-width100px;
27 text-shadow0 1px 0 rgba(0,0,0,0.35);
28 font-familyArialTahomasans-serif;
29 -webkit-transition: all linear .2s;
30 -moz-transition: all linear .2s;
31 -o-transition: all linear .2s;
32 -ms-transition: all linear .2s;
33 transition: all linear .2s
34 }
35 .blu-btn:hover, .blu-btn:focus {
36 -webkit-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0rgba(0,0,0,0.3), inset 0 12px 20px 2px #3089d8;
37 -moz-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0rgba(0,0,0,0.3), inset 0 12px 20px 2px #3089d8;
38 box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.3), inset 012px 20px 2px #3089d8;
39 }
40 .blu-btn:active {
41 -webkit-box-shadow: inset 0 2px 0 0 rgba(0,0,0,0.2), inset 0 12px 20px 6pxrgba(0,0,0,0.2), inset 0 0 2px 2px rgba(0,0,0,0.3);
42 -moz-box-shadow: inset 0 2px 0 0 rgba(0,0,0,0.2), inset 0 12px 20px 6pxrgba(0,0,0,0.2), inset 0 0 2px 2px rgba(0,0,0,0.3);
43 box-shadow: inset 0 2px 0 0 rgba(0,0,0,0.2), inset 0 12px 20px 6pxrgba(0,0,0,0.2), inset 0 0 2px 2px rgba(0,0,0,0.3);
44 }
45  
46  
47 .grn-btn {
48 display: inline-block;
49 -moz-border-radius: .25em;
50 border-radius: .25em;
51 -webkit-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.2);
52 -moz-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.2);
53 box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.2);
54 background-color#659324;
55 background-image: -moz-linear-gradient(#81bc2e,#659324);
56 background-image: -ms-linear-gradient(#81bc2e,#659324);
57 background-image: -webkit-gradient(linear,left top,leftbottom,color-stop(0%,#81bc2e),color-stop(100%,#659324));
58 background-image: -webkit-linear-gradient(#81bc2e,#659324);
59 background-image: -o-linear-gradient(#81bc2e,#659324);
60 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#81bc2e',endColorstr='#659324',GradientType=0);
61 -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#81bc2e', endColorstr='#659324', GradientType=0)";
62 background-image: linear-gradient(#81bc2e,#659324);
63 border0;
64 cursorpointer;
65 color#fff;
66 text-decorationnone;
67 text-aligncenter;
68 font-size16px;
69 padding0px 20px;
70 height40px;
71 line-height40px;
72 min-width100px;
73 text-shadow0 1px 0 rgba(0,0,0,0.35);
74 font-familyArialTahomasans-serif;
75 -webkit-transition: all linear .2s;
76 -moz-transition: all linear .2s;
77 -o-transition: all linear .2s;
78 -ms-transition: all linear .2s;
79 transition: all linear .2s;
80 }
81 .grn-btn:hover, .grn-btn:focus {
82 -webkit-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0rgba(0,0,0,0.3), inset 0 12px 20px 2px #85ca26;
83 -moz-box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0rgba(0,0,0,0.3), inset 0 12px 20px 2px #85ca26;
84 box-shadow: 0 2px 0 0 rgba(0,0,0,0.1), inset 0 -2px 0 0 rgba(0,0,0,0.3), inset 012px 20px 2px #85ca26;
85 }
86 .grn-btn:active {
87 -webkit-box-shadow: inset 0 2px 0 0 rgba(0,0,0,0.2), inset 0 12px 20px 6pxrgba(0,0,0,0.2), inset 0 0 2px 2px rgba(0,0,0,0.3);
88 -moz-box-shadow: inset 0 2px 0 0 rgba(0,0,0,0.2), inset 0 12px 20px 6pxrgba(0,0,0,0.2), inset 0 0 2px 2px rgba(0,0,0,0.3);
89 box-shadow: inset 0 2px 0 0 rgba(0,0,0,0.2), inset 0 12px 20px 6pxrgba(0,0,0,0.2), inset 0 0 2px 2px rgba(0,0,0,0.3);
90 }

查看更多关于【css教程】的文章

展开全文
相关推荐
反对 0
举报 0
评论 0
图文资讯
热门推荐
优选好物
更多热点专题
更多推荐文章
css实现弹出框 css弹出菜单
弹出框也是前端里面经常使用的一个应用场景了,最开始想到的是用js实现这个效果,看到codepen上面有用css实现的。其实就是用到了css里面的一个:target选择器+visibility属性。URL 带有后面跟有锚名称 #,指向文档内某个具体的元素。这个被链接的元素就是目标

0评论2023-03-08519

jfinal框架页面找不到相关css,js文件404
在JFinalConfig中添加配置: @Overridepublic void configHandler(Handlers handlers) {handlers.add(new ContextPathHandler());}页面中添加:base href="${CONTEXT_PATH}/"/之前页面找不到资源,把tomcat工程路径去掉了(path=""),这样暂时解决了问题推荐

0评论2023-03-08576

移动端CSS底部固定和fixed定位在ios上的bug
fixed定位在ios上的bugcss三栏布局假设我们页面的 HTML 结构是这样: div class="wrapper"div class="content"!-- 页面主体内容区域 --/divdiv class="footer"!-- 需要做到 Sticky Footer 效果的页脚 --/div/div方法1.:absolute通过绝对定位处理应该是常见的

0评论2023-03-08624

css实现图片翻转 css使图片旋转
!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"headmeta http-equiv="Content-Type" content="text/h

0评论2023-03-08577

CSS3中的px,em,rem,vh,vw辨析 css3 vw
1、px:像素,精确显示2、em:继承父类字体的大小,相当于“倍”,如:浏览器默认字体大小为16px=1em,始终按照div继承来的字体大小显示,进场用于移动端          em换算工具:http://www.runoob.com/tags/ref-pxtoemconversion.html3、rem:与em类似,

0评论2023-03-08902

gulp自动化构建工具--自动编译less为css--学习笔记
 1.安装      命令:npm install gulp-less 或者 cnpm install gulp-less2.编写文件 //获取gulpvar gulp = require('gulp')//获取gulp-less模块var less = require("gulp-less")//编译less//在命令行输入gulp less启动此任务gulp.task('less',function(){

0评论2023-03-08411

关于动画Animate.css的使用方法
    首先贴个官网:https://daneden.github.io/animate.css/  1、引入animate css文件 1 head2 link rel="stylesheet" href="animate.min.css"3 /head   2、给指定的元素加上指定的动画样式名div class="animated bounceOutLeft"/div    这里包

0评论2023-03-08673

selenium Firefox禁用js,css.falsh,缓存,设置请求头和代理ip
1 profile = FirefoxProfile() 2 #请求头 3 #profile.set_preference("general.useragent.override", util.http_agent_insert(xinhuaUtil.agent_path)) 4 # 激活手动代理配置(对应着在 profile(配置文件)中设置首选项) 5 profile.set_preference("network

0评论2023-03-08777

CSS--容易混淆的.class1.class2与.class1 .class2的区别
容易混淆的.class1.class2与.class1 .class2的区别:第一个中间没空格的,匹配的是同时拥有class1和class2的元素。第二个中间有空格的,匹配的是父节点是class1类,子节点是class2类的元素。

0评论2023-03-08554

页面css样式找不到问题 页面css样式找不到问题怎么解决
出现了一个页面没有样式的问题:问题:  1.路径不对, 可以打开页面f12看样式是否找到  检查路径是否正确。  2.样式没引全或者没引对。查看引入的样式是否正确或缺少样式。  3.路径明明写对了却404找不到。可以试一试把${pageContext.request.context

0评论2023-03-08414

学习前端页面css定位 网页前端设计css
一、相对定位:absolute  相对定位是一个非常容易掌握的概念。如果对一个元素进行相对定位,它将出现在它所在的位置上。然后,可以通过设置垂直或水平位置,让这个元素“相对于”它的起点进行移动。position:relative;同时可以设置上下左右位置偏移;rela

0评论2023-03-08782

css-移动端模拟hover效果 css移动端适配
:hover 在移动端中,点击后一直处于hover状态,不会切换。为此解决:通过:active模拟!-- * @Author: lingxie * @Date: 2020-04-23 13:35:57 * @Descripttion: -- templatediv class="about"h1This is an about page/h1div class="btn-hole"按钮/div/div/templ

0评论2023-03-08409

css固定定位,不随滚动条滚动 css固定在底部
!DOCTYPE htmlhtml lang="en"headmeta charset="UTF-8"meta http-equiv="X-UA-Compatible" content="IE=edge"meta name="viewport" content="width=device-width, initial-scale=1.0"titleDocument/titlestyleb

0评论2023-03-08745

(转)JAVA中解决Filter过滤掉css,js,图片文件等问题
在加入过滤器时,会出现网页可以加载,但是网页中的js,css等文件无法加载的问题。因为在网页加载时,先将整个网页加载,然后加载网页中的js,css等文件,而在进行js,css文件加载时,会被过滤器过滤掉。因此在过滤器中加入一个对css,js等文件的判断,就可以

0评论2023-03-08794

CSS3 Flexbox轻松实现元素的水平居中和垂直居中
CSS3 Flexbox轻松实现元素的水平居中和垂直居中网上有很多关于Flex的教程,对于Flex的叫法也不一,有的叫Flexbox,有的叫Flex,其实这两种叫法都没有错,只是Flexbox旧一点,而Flex是刚出来不久的东西而已,为了方便说明,赶上新技术,下面我就把这种布局叫Fl

0评论2023-03-08774

css3多行文本溢出显示省略号… css3行超出省略号
.title {width: rem(210);overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;}

0评论2023-03-08638

更多推荐