Archive for month: 六月, 2009

单选按钮与文字绝对垂直居中的方法

很显然 这个问题已经困扰着我们很久 HTML下的input总是给我们带来无尽的烦恼 好在我们有强大的CSS 所以 也就应了那句话 兵来将挡 水来土掩 CSS部分: body{ margin:20px; font-size:12px; } .input{ float:left; *margin:-1px 0; } span{ float:left; margin-top:-3px; } HTML部分: <div style="height:25px; line-height:25px; "> <input type="radio" name="radiobutton" value="radiobutton" /><span>我肯定是和单选按钮垂直居中的</span> </div> 当然 我在body里设置margin是为了看的方便 另外 这是字体在12px的情况下 如果是14px应该直接给radio来个vertical-align:middle就可以了 至于margin:-1px 0;是因为input在万恶的IE下上下都会多出1px的高度

一个有点意思的导航

CSS部分: #menu { clear: both; margin: 0; padding: 0; } #menu ul { position: relative; top: 5px; margin: 0; padding: 0; float: left; font: bold 1.4em ‘Trebuchet MS’, Tahoma, Arial, Sans-serif; width: 850px;/* 775px; */ border: 1px solid #808080; border-width: 0 0 4px 0; list-style: none; } #menu ul li{ display: inline; } #menu ul [...]

三栏布局最先显示中栏内容的方法

这是先前在keso的博客上看到的 CSS部分: body{ font-size:12px; } div{ color:#fff; } #m{ padding-left:150px; } #middle{ position:absolute; margin:0 auto; width:470px; background:red; } #left{ float:left; width:140px; height:30px; background:green; } #right{ float:right; width:140px; background:blue; } #all{ width:770px; margin:0 auto; background:#ffa200; color:#000; } #footer{ clear:both; background:#808080; color:#fff; } HTML部分: <div id="all"> <div id="m">     <div id="middle"> 中栏<br />       ·IT人的出路系列思考(三): 提升学习能力与可持 .. [...]

类似百度空间登录界面的写法

CSS部分: .bottom{ margin:0 auto; width:960px; height:200px; background:#66CC00; } .under{ position:absolute; margin:-25px 0 0 600px; width:300px; height:250px; background:#e8e8e8; color:#fff; } .top{ position:absolute; right:5px; bottom:5px; width:300px; height:250px; background:#0066FF; } HTML部分: <div class="bottom"> <div class="under"> <div class="top"></div> </div> </div> 不知道用float的办法 能不能把登陆区域放到右边去··· 抽空琢磨一下

CSS—8款CSS制作数据报表技巧

Demo1:http://apples-to-oranges.com/goodies/css-for-bar-graphs/ Demo2:http://alistapart.com/d/accessibledata/example-barchart.html Demo3:http://apples-to-oranges.com/blog/post/css-for-bar-graphs/?id=55 Demo4:http://www.maxdesign.com.au/presentation/percentage/ Demo5:http://cssglobe.com/lab/csschart/ Demo6:http://www.jgc.org/blog/2005/12/css-absolute-positioning-scatter-plot.html Demo7:http://www.cssplay.co.uk/menu/barchart.html Demo8:http://www.standards-schmandards.com/exhibits/barchart/ 原文:http://sixrevisions.com/css/css_techniques_charting_data/

超强去除斜线的方法–伟大的PS

很久没看PS的东西 今天在BI上看到这篇帖子 真是太唏嘘了 不得不感叹一下:PS真是伟大啊···作者也很伟大 感谢一下作者 怎样把上面的斜线给去掉呢? 一下看到这张图 是不是蒙了呢? 不过 没关系 有伟大的PS在 没什么解决不了的··· 再整理一下操作步骤: 第一步 提取斜线 第二步 定义该斜线为填充图案 第三步 选取斜线覆盖的部分 新建图层 用第二步的斜线填充图案来填充图层 第四步 转换新建图层为选取 使该填充层与原图里的斜线对齐 点击原图 第五步 设置原图的色阶 以时间情况为准 第六步 隐藏填充层 搞定 关键步骤 提取斜线 与原图斜线对齐 色阶的操作 当然还有注意第二步中的定义斜线为填充图案 要是透明背景 ···· 具体图文步骤 参见作者的帖子