常用Css样式
/*标题元素*/
h1,h2,h3,h4,h5,h6 {
color: green;
}
/*父元素继承*/
body {
font-family: Verdana, sans-serif;
}
/*id 选择器*/
#red {color:red;}
/*id 选择器和派生选择器*/
#red p {
font-style: italic;
text-align: right;
margin-top: 0.5em;
}
/*类选择器*/
.center {text-align: center}
/*属性*/
/*背景*/
background-color: gray;
background-image:url(../image/topmiddle.jpg);
background-repeat:no-repeat;
/*文字*/
text-align:left;
font-size:11px;
font-family:黑体;
line-height:25px;*行间距*/
text-indent:16px;/*文字缩近*/
letter-spacing ;/*文字之间的间隔*/
word-spacing ;/*单词之间的间隔*/
/*外边距*/
margin-top:5px;
/*内边距*/
padding-bottom:30px;
/*边框*/
border-color:#e1e0e0;
border-style:solid;
border-width:0px 1px 1px 1px;
/*浮动*/
float: left;
/*绝对定位*/
#box_relative {
position: absolute;
left: 30px;
top: 20px;
}
/*相对定位*/
#box_relative {
position: relative;
left: 30px;
top: 20px;
}
相关文档:
text-overflow : ellipsis;
white-space : nowrap;
overflow : hidden;
解释一下:
text-overflow :ellipsis; //让截断的文字显示为点点。还有一个值是clip意思是截断不显示点点
white-space : nowrap; //让文字不换行
overflow : hidden; //超出要隐藏
要显示为点点,3个缺一不可,还有,除了firefox,opera其他浏 ......
还在为毕业设计而烦恼么 看看这里 我帮你搞定就好
本人实际开发经验丰富 学过各类程序编写 前后台都可以
现在的工作不怎么景气呀 所以找点外快养家糊口呀 呵呵
报酬嘛 过得去就行了 没什么要求 交个朋友嘛
如果有意者可与本人联系qq604884385 Tel13438309220 ......
我承认我并不经常想这个问题......我们写的css的效率是怎么样的呢,浏览器渲染的速度又如何呢?
这是应该是浏览器开发者应该关心的(页面加载更快,用户就会更愉快)。Mozilla有一篇文章:about best practices . Google当然也很关心这个问题,他们也有这样一篇文章:Optimize browser rendering 。
让我们了解下他们主要倡 ......
可以在博客的配置页面的自定义css栏中填入css样式代码来自定也blog的风格
csdn blog的页面架构基本是由div实现的,整个页面主要由三个div组成,它们的id分别是:
csdnblog_header,
csdnblog_sidebar, csdnblog_content。
所以,定义它们的主体样式可以这样:
#csdnblog_header
{
//头部的风格 ......
发文章中,图片把div撑破了的解决办法
原来图片自适应宽度一般都是通过Javascript来解决的,但是多少还是比较麻烦。还有一种通过设置外层容器overflow:hidden属性来解决,但是这样会导致图片显示不全的问题。今天看到了一种新的解决办法,通过CSS来解决这个问题。
CSS代码
img{
max-width:500px;&nbs ......