平常的圆角边框CSS方法我们都知道了,这里要说的是另一种比较特别的方法,是在百度知道页面里看到的。当时研究了一下,它的圆角边框就用了一张图片,然后把图片的4分之1各放到一个角,就搞掂了。你可以先到百度知道里先看看效果:http://zhidao.baidu.com/
下面的模仿并不是很完美再现百度知道里的CSS,仅作抛砖引玉用。
平常的圆角边框CSS方法我们都知道了,这里要说的是另一种比较特别的方法,是在百度知道页面里看到的。当时研究了一下,它的圆角边框就用了一张图片,然后把图片的4分之1各放到一个角,就搞掂了。你可以先到百度知道里先看看效果:http://zhidao.baidu.com/
下面的模仿并不是很完美再现百度知道里的CSS,仅作抛砖引玉用。
1.CSS字体属性简写规则
一般用CSS设定字体属性是这样做的:
font-weight:bold;
font-style:italic;
font-varient:small-caps;
font-size:1em;
line-height:1.5em;
font-family:verdana,sans-serif;
但也可以把它们全部写到一行上去:
font: bold italic small-caps 1em/1.5em verdana,sans-serif;
漂动的星:
<DIV><CENTER><EMBED style=''RIGHT: 100px; WIDTH: 800px; POSITION: absolute; TOP: 0px; HEIGHT: 1000px'' align=right src=http://forshine.net/flash/5.swf type=application/octet-stream wmode=''transparent'' quality=''high'' ;;> </CENTER></DIV>
...
本人亲测可用。
#article img { /*-- 专门用于限定文章DIV下的图片 --*/
max-width: 150px;
max-height: 50px;
}
* html #article img {
width: expression(this.width > 150 && this.width > this.height ? 150 : auto);
height: expresion(this.height > 50 ? 50 : auto);
}
制作页面要在表格内插入背景图时,我们可以使用CSS进行控制,代码如下:
style="background-image:url(./images/counter_bg.jpg);background-repeat: no-repeat;background-position: right bottom;"
其中,./images/counter_bg.jpg为显示图片路径。