html5css代码⼤全,css常⽤代码⼤全Css背景颜⾊透明
.liter{
filter:progid:adient(enabled='true',startColorstr='#4CDDDDDD', endColorstr='#4CDDDDDD');
}
:root .liter {
filter:none; /*处理IE9浏览器中的滤镜效果*/
background-color:rgba(221,221,221,0.3);
}
图⽚垂直居中对齐
第⼀种:table-cell法
.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法
.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;
}
学生个人网页制作html代码csscss 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固定在底部
/*
Sticky Footer Solution by Steve Hatcher
*/
* {margin:0;padding:0;}
/
* must declare 0 margins on everything, also for main layout components use padding, not vertical margins (top and bottom) to add spacing, else those margins get added to total height and 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*/
}
/* IMPORTANT You 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.
*/
纯粹的css固定在底部flex系统中文叫什么
#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;

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。