css问题 我怎么吧hoverbox的框往上移动呢?

html-css07

css问题 我怎么吧hoverbox的框往上移动呢?,第1张

margin:-38px 0 0 110px

*margin:0 0 0 -6px

_margin:0 0 0 -4px

把margin的第一个数值都变为负的,就可以了(第四个数值分别是上右下左)

* 整个文件

{

border: 0没有边框

margin: 0外间距为0

padding: 0内间距为0

}

a

{

text-decoration: none所有默认超链接没有下划线

}

body 所有内容

{

background: #000000 背景色为黑色

color: #777 文字颜色为#777

margin: 0 auto 样式左右局中 上下顶头

padding: 50px 内间距50像素

position: relative 对象不可层叠

width: 620px 样式宽度为620px

}

h1

{

background: inherit 背景色继承父本

/*

border-bottom: 1px dashed #ccc 被注视掉了

*/

color: #933 文字颜色#933

font: 17px Georgia, serif 文字属性

margin: 0 0 10px 外间距 上左右0像素 下10像素

padding: 0 0 5px 内间距 上左右0像素 下5像素

text-align: center 文字水平局中

}

p

{

clear: both 清除浮动

font: 10px Verdana, sans-serif 文字样式

padding: 10px 0 内间距 上下10像素 左右0像素

text-align: center文字水平局中

}

p a

{

background: inherit段落背景色继承父色

color: #777 超链接文字颜色为#777

}

p a:hover

{

background: inherit

color: #000 段落超链接鼠标经过时颜色为黑色

}

/* =Hoverbox Code

----------------------------------------------------------------------*/ 被注视掉

.hoverbox

{

cursor: default 鼠标样式不显示

list-style: none 清除样式

}

.hoverbox a

{

cursor: default 鼠标样式不显示

}

.hoverbox a .preview

{

display: none 鼠标样式不显示

}

.hoverbox a:hover .preview鼠标经过

{

display: block 鼠标样式显示

position: absolute 对象不可层叠

top: -33px 据顶端-33个像素

left: -45px 据左边-45个像素

z-index: 1 纵坐标为1

}

.hoverbox img boverbox里的图片

{

background: #fff 背景色白色

border-color: #aaa #ccc #ddd #bbb 边框上右下左的颜色

border-style: solid 边框为实线

border-width: 1px 边框1个像素

color: inherit 文字颜色继承父色

padding: 2px内间距2个像素

vertical-align: top 竖直顶端对齐

width: 100px 宽度100像素

height: 75px 高度75像素

}

.hoverbox li hoverbox里的li标记

{

background: #eee背景色 #eee

border-color: #ddd #bbb #aaa #ccc边框上右下左的颜色

border-style: solid边框为实线

border-width: 1px边框1个像素

color: inherit文字颜色继承父色

display: inline内联对象

float: left左浮动

margin: 3px外间距3像素

padding: 5px内间距5像素

position: relative对象不可层叠

}

.hoverbox .preview

{

border-color: #000边框颜色#000

width: 200px 宽度200像素

height: 150px高度150像素

}

给分吧 很辛苦的哦