图片垂直居中是个经典的问题,网上关于这个的方法也非常多,良莠不齐,本人比较推荐的以下三种简单的方法,大家可以稍做参考。1.淘宝的方法 在曾经的"淘宝UED招聘"中有这样一道题目: “使用纯CSS实现未知尺寸的图片(但高宽都小于200px)在200px的正方形容器中水平和垂直居中。” 当然出题并不是随 Read More
posted @ 2016-09-01 17:15 ybingbing_1213 Views(199) Comments(0) Diggs(0)
滚动条滚动到50后:html部分:js部分:$(document).ready(function(){ $(window).scroll(function() { if ($(window).scrollTop() > 50) { //滚动条滚动到50的时候出现“返回顶部”... Read More
posted @ 2015-09-07 09:57 ybingbing_1213 Views(615) Comments(0) Diggs(0)
1. 如果合并边框border-collapse:collapse;就必须设置cellspacing="0″。2.border-spacing与cellspacing功能是一样的,区别在于前者是css属性,后者是table标签属性 。 Read More
posted @ 2015-09-02 17:49 ybingbing_1213 Views(730) Comments(0) Diggs(0)
1.alt图片不存在时,显示alt里面的内容。2.title当鼠标滑动到图片上,弹出的一个提示,显示title里面的内容。 Read More
posted @ 2015-09-02 12:04 ybingbing_1213 Views(211) Comments(0) Diggs(0)
posted @ 2015-09-02 11:04 ybingbing_1213 Views(114) Comments(0) Diggs(0)
html部分: css部分:.pr{ position: relative;}.a-c-a{ position: absolute; width: 200px; left: 0; right: 0; margin-left: auto; margin-right: a... Read More
posted @ 2015-08-28 16:15 ybingbing_1213 Views(165) Comments(0) Diggs(0)
图片下载失败:html部分:文本替换heading 2css部分:#h2{ position: relative; width: 250px; height: 76px; overflow: hidden;}#h2 span{ position: absolute; widt... Read More
posted @ 2015-08-27 10:04 ybingbing_1213 Views(186) Comments(0) Diggs(0)
html部分:上 内容内容内容内容内容内容下css部分:.box2{ background-color: #ccc;}#box{ background-color: #eee;}#box p{ margin: 20px 0; text-align: center;}注:对1px间距没... Read More
posted @ 2015-08-26 10:30 ybingbing_1213 Views(189) Comments(0) Diggs(0)
html部分: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz就可以解决。此样式可以让表格中的一些连续的英文单词自动换行就可以解决。此样式可以让... Read More
posted @ 2015-08-25 10:05 ybingbing_1213 Views(185) Comments(0) Diggs(0)
使用绝对定位之后的对象,无需再考虑它在页面中的浮动关系,只要设置对象的top,right,bottom,left四个方向的值即可。html部分:zzzzzzccccrrrrrcss部分:#left{ background-color: #68C026; border: 2px solid #... Read More
posted @ 2015-08-25 09:39 ybingbing_1213 Views(137) Comments(0) Diggs(0)