当前位置:首页 > 黑客服务 > 正文内容

所有代码(脑叶公司所有代码)

hacker2年前 (2022-06-14)黑客服务167

css常见的快捷开发代码汇总(长期更新),包括CSS3代码,有一些css效果很顽固,经常会一时找不出解决方案,网络上也有很多的工具和高手提供了具体的浏览器兼容代码,这个页面我今后会经常整理,希望能够帮到重构和正在找这些效果的代码,如果你有更好的实现方案,不妨告诉我,或者你有解决不了的,也不妨告诉我。

Css背景颜色透明(#ddd)liter{filter:progid:DXImageTransform.Microsoft.gradient(enabled='true',startColorstr='#4CDDDDDD', endColorstr='#4CDDDDDD');}:root .liter {filter:none; /*处理IE9浏览器中的滤镜效果*/background-color:rgba(221,221,221,0.3);}

图片垂直居中对齐第一种:table-cell法

<div class="test_box"> <img src="book.jpg" alt="" /></div>

.test_box {display:table-cell;width:200px;height:200px;vertical-align:middle;text-align:center;*float:left;*font-family:simsun;*font-size:200px;*line-height:1;border:1px solid #000000;}.test_box img {vertical-align:middle;}

第二种:span法 <div class="test_box"> <span class="hook"></span> <a href="" alt="" /></a></div> .test_box {width:200px;height:200px;overflow:hidden;text-align:center;font-size:0;border:1px solid #000000;}.test_box .hook {display:inline-block;width:0;height:100%;overflow:hidden;margin-left:-1px;font-size:0;line-height:0;vertical-align:middle;}.test_box img {vertical-align:middle;border:0 none;}

css border制作小三角(兼容IE6).triangle {display:inline-block;width:0;height:0;overflow:hidden;line-height:0;font-size:0;vertical-align:middle;border-right:7px solid #000fff;border-left:0 none;border-top:7px solid transparent;border-bottom:7px solid transparent;_color:#FF3FFF;_filter:chroma(color=#FF3FFF);}

CSS固定在底部

CSS代码

/*Sticky Footer Solutionby Steve Hatcher http://stever.cahttp://www.cssstickyfooter.com*/* {margin:0;padding:0;} /* must declare 0 margins on everything, also for main layout components use padding, notvertical margins (top and bottom) to add spacing, else those margins get added to total heightand your footer gets pushed down a bit more, creating vertical scroll bars in the browser */html, body {height: 100%;}#wrap {min-height: 100%;}#main { overflow:auto; padding-bottom: 150px; /* must be same height as the footer */}#footer { position: relative; margin-top: -150px; /* negative value of footer height */ height: 150px; clear:both;}/*Opera Fix*/body:before {/* thanks to Maleika (Kohoutec)*/ content:""; height:100%; float:left; width:0; margin-top:-32767px;/* thank you Erik J - negate effect of float*/}/* IMPORTANTYou also need to include this conditional style in the of your HTML file to feed this style to IE 6 and lower and 8 and higher.<!--[if !IE 7]><style type="text/css"> #wrap {display:table;height:100%}</style>< ![endif]-->*/

展开全文

HTML代码

<div id="wrap"> <div id="main"> </div></div><div id="footer"></div>

纯粹的css固定在底部#footer { position:fixed; left:0px; bottom:0px; height:32px; width:100%; background:#333;}/* IE 6 */* html #footer { position:absolute; top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');}

用CSS包裹内容很长的URL和文本

这个代码片段通过保证文本的包裹元素宽度适应内容的宽度,能够避免很长的文本超出内容区域。

所有代码(脑叶公司所有代码)

pre { white-space: pre; /* CSS 2.0 */ white-space: pre-wrap; /* CSS 2.1 */ white-space: pre-line; /* CSS 3.0 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ white-space: -moz-pre-wrap; /* Mozilla */ white-space: -hp-pre-wrap; /* HP Printers */ word-wrap: break-word; /* IE 5+ */} 用css3创造3D文字

text-shadow属性能帮助你只用CSS创造3D文字。

p.threeD{ text-shadow: -1px 1px 0 #ddd, -2px 2px 0 #c8c8c8, -3px 3px 0 #ccc, -4px 4px 0 #b8b8b8, -4px 4px 0 #bbb, 0px 1px 1px rgba(0,0,0,.4), 0px 2px 2px rgba(0,0,0,.3), -1px 3px 3px rgba(0,0,0,.2), -1px 5px 5px rgba(0,0,0,.1), -2px 8px 8px rgba(0,0,0,.1), -2px 13px 13px rgba(0,0,0,.1) ;}

CSS透明度div{ opacity: .75; /* Standard: FF gt 1.5, Opera, Safari */ filter: alpha(opacity=75); /* IE lt 8 */ -ms-filter: "alpha(opacity=75)"; /* IE 8 */ -khtml-opacity: .75; /* Safari 1.x */ -moz-opacity: .75; /* FF lt 1.5, Netscape */}

改变博客中默认选中文本的颜色::selection { background: #ffb7b7; /* Safari */ color: #ffffff;}::-moz-selection { background: #ffb7b7; /* Firefox */ color: #ffffff;}

多重背景图片#multiple-images { background: url(image_1.png) top left no-repeat, url(image_2.png) bottom left no-repeat, url(image_3.png) bottom right no-repeat;}

多栏CSS3

使用css3来创建多栏,它可以自适应网页,不兼容IE

#columns-3 { text-align: justify; -moz-column-count: 3; -moz-column-gap: 12px; -moz-column-rule: 1px solid #c4c8cc; -webkit-column-count: 3; -webkit-column-gap: 12px; -webkit-column-rule: 1px solid #c4c8cc;}

文本溢出省略.textoverflow a { display:block; width:120px; margin: 0px 0px 0px 3px; white-space: nowrap; overflow: hidden; float: left; -o-text-overflow: ellipsis; /* for Opera */ text-overflow: ellipsis; /* for IE */}.textoverflow:after{ content: "..."; }/* for Firefox */@media all and (min-width: 0px){ .textoverflow:after{ content:""; }/* for Opera */ }

让IE9以下的版本支持HTML5

在项目中加入以下js代码

// html5 shivif (!+[1,]) { (function() { var tags = [ 'article', 'aside', 'details', 'figcaption', 'figure', 'footer', 'header', 'hgroup', 'menu', 'nav', 'section', 'summary', 'time', 'mark', 'audio', 'video'], i = 0, len = tags.length; for (; i < len; i++) document.(tags[i]); })();}or <!--[if lt IE 9]>< src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></><![endif]-->

PNG32透明(IE6)

主要用来兼容IE6,不建议使用,由于这个css代码比较耗内存。

.some_element { background: url(image.png); _background: none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image.png', sizingMethod='crop');}

所有代码(脑叶公司所有代码)

觉得本文对你有帮助?请分享给更多人

关注「网页设计自学平台」快速提升技能

福利!免费领取腾讯高级讲师网页设计教程

来源:前端开发博客

每天学一点·小白快速进阶大神

设计|DW教程|AE教程|前端资讯

微信ID:WEB_wysj

扫描二维码推送至手机访问。

版权声明:本文由黑客接单发布,如需转载请注明出处。

本文链接:http://therlest.com/110231.html

标签: 所有代码
分享给朋友:

“所有代码(脑叶公司所有代码)” 的相关文章

贾秀东个人资料简介(简历及图片)

贾秀东人物概况 本页面提供了贾秀东个人资料简介(简历及图片),贾秀东是谁?贾秀东个人简介资料完整设计了网页求职找工作编辑个人简历作品所需要的贾秀东网站常用模板元素,不保证贾秀东人物数据真实,任何问题请联系管理员调整。 贾秀东图片 贾秀东个人资料简介 贾秀东,中国国际问题研究所特聘研究员。1...

吃鸡鸭的屁股会有病吗?我非常爱吃鸡鸭的屁股,但经常吃会有病吗?另

吃鸡鸭的屁股会有病吗?我非常爱吃鸡鸭的屁股,但经常吃会有病吗?另 鸡鸭的肛门附近组织,布满大大小小的腺体,各类秽物与毒素都在这些腺体囤积;鸡鸭的肛门也有非常高密度的大肠杆菌,所以鸡鸭的屁股不是少吃的问题,而是不能吃.吃得少可能没觉出怎样,多了问题就显出来了.而且鸡鸭屁股的大肠杆菌会随着蛋生出来的时...

鸡业行情网今日鸡价,鸡业行情网下载安装

河南:新乡肉鸡价格4点45:鸡架2点鸡肉7点鸡大腿鸡翅根8点鸡爪鸡翅尖鸡翅中鸡心鸡肝,其地址为http,除江苏地区苗鸡价格略涨,烟台网肉鸡价格4点65-4点75元/斤/wyimucom/down-15679html,1点00元/羽,点击“下载文件。以市斤为单位/羽 菏泽鸡苗价格3点90-4点30元/...

山东价格协会(山东物流网)

东北等北方地区,可以去那里看一下。自己挑合适的,发往,我刚开一家物流公司,56888的软件配货,不知道物流价格是怎么算的. 衣服,哦,4008111111着是顺风快递的电话。而且显示正在备货。免费的东西总是会有不足的地方,在烟台住,济宁到济南一个)普通件,山东省服务标准化技术委员会物流分技术委员会于...

西安电脑黑客接单_怎么能找入侵蚊香社的黑客

sudo apt install g++-4.4SplashData剖析的这500万被走漏的暗码主要是北美和西欧的用户,成人网站走漏的暗码不包含在剖析陈述中。 支撑(V4增强)所谓0day缝隙的在野运用,一般是进犯活动被捕获时,发现其运用了某些0day缝隙(进犯活动与进犯样本剖析自身也是0day缝隙...

查开放房软件app(免费查开放房的软件)

  你仅仅坚持不懈和女孩儿入睡。假如你发觉仅有大家2个,你应该坚持不懈再开一个。可是你的迟疑说明你還是想和他发生关系。留意防护措施。   线上查询对外开放门户网应用软件,并查询对外开放门户网应用软件系统软件下载   在哪儿申请办理公共性租用住宅?   我与男友在网络上了解的。我北京市找他。他为我开过...

评论列表

南殷歆笙
2年前 (2022-06-14)

er */html, body {height: 100%;}#wrap {min-height: 100%;}#main { overflow:auto; padding-bott

双笙边侣
2年前 (2022-06-14)

'details', 'figcaption', 'figure', 'footer', 'header', 'hgroup', 'menu', 'nav', 'section', 'summary', 'time', '

颜于弥繁
2年前 (2022-06-14)

e-wrap; /* Mozilla */ white-space: -hp-pre-wrap; /* HP Printers */ word-wrap: break-word; /* IE 5+

美咩心児
2年前 (2022-06-14)

ne-height:1;border:1px solid #000000;}.test_box img {vertical-align:middle;}第二种:span法 <div class="test_box"> <span

只酷西奺
2年前 (2022-06-14)

some_element { background: url(image.png); _background: none; _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='image

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。