ITeye博客

CSS

共 4 篇文章

CSS3 圆角按钮

<html> <head> <title>My project</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <style> .button { display: inline-block; outline: none; cursor: pointer; text-align: center; text-decoration: none; font: 14px/100% Arial, Helvetica, sans-serif; padding: .5em 2em .55em; te…

2012-09-21 22:13 · CSS

CSS 圆角

先说一下Firefox的圆角属性: -moz-border-radius: {1,4} | inherit 如果你想设置四个角都是一样圆角的话,可以像这样子直接设置-moz-border-radius:5px; 也可以单独设置元素的上左、上右、下右、下左四个角的值,分别用-moz-border-radius-topleft、-moz-border-radius-topright、-moz-border-radius-bottomright、-moz-border-radius-bottomleft来设置。 也可以用合并起来一起设置,如我目前的主题暂时设置的-moz-border-radius…

2012-09-21 22:11 · 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"> <head> <title>CSS边框阴影</title> <style> .dropshadow2{ float:left; clear:left; background: url(/jscss/demoimg/200903/shadowAlpha.png) no…

2012-09-21 20:30 · CSS

span元素的width问题

最近遇到一个问题,无法为span元素设置width属性。查看CSS文档得知,浏览器会忽略行内元素(inline,或称:内联元素)的width属性。 网上给出的一种解决方法: span { background-color:#f00; display:block; width:200px;} 但是这样会使 span 和它前后的元素分属两行,也就是说 span 其实是变成类似 div 的块级 (block)元素。 另一种解决方案(在上面的基础上增加左浮动): span { background-color:#f00;display:block; float:left; width:200px;}…

2012-09-13 12:53 · CSS