Home  >  Article  >  Web Front-end  >  About the gap between two DIVs_html/css_WEB-ITnose

About the gap between two DIVs_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:08:391089browse

984471a9da7e70d1bb03794ad3ff9677
dc6dce4a544fdca2df29d5ac0ea9906b
5dfe71cdfb170b964ea20533d4ee315e
16b28748ea4df4d9c2150843fecfba68
4cbba894beb26d9e4625853609405c30
da08a9bdc5fb62569ca6cee93c870a28
40df8323eb35304501c268e897c1355f
05489f330f48def869e895d538b1d761
ff6d136ddc5fdfeffaf53ff6ee95f185
 25edfb22a4f469ecb59f1190150159c6638c3bb19205b51966eae435ad5c4308d9eb0286ab4361fe2ef6d4c94a471099a376092e9406724d5c271fcc648ed25a5db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
 25edfb22a4f469ecb59f1190150159c671c42d41f3e99e1fe48ca578e02ca659ca5e02d9352ceba4c70bab92f1b3870ca376092e9406724d5c271fcc648ed25a5db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
 25edfb22a4f469ecb59f1190150159c62cf8322706cf120a904629837b6b1a39bf05d70202b618c97e88148ac3340e11a376092e9406724d5c271fcc648ed25a5db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
 25edfb22a4f469ecb59f1190150159c6afbeb07f9ba15926dcc60bc7f5f79d7f885ad31c66fd341e12de183e111b2de9a376092e9406724d5c271fcc648ed25a5db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
 25edfb22a4f469ecb59f1190150159c6e1da570b09a8d192c978d55e564fb6ab26596f6888567737cc70ee0ce8f7d320a376092e9406724d5c271fcc648ed25a5db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
 25edfb22a4f469ecb59f1190150159c6bf18cf2019d0895cc7ad65a3f3a49fc1fd3fd1d421c429d407619bf5597e6efaa376092e9406724d5c271fcc648ed25a5db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
929d1f5ca49e04fdcb27f9465b944689
         16b28748ea4df4d9c2150843fecfba68
         16b28748ea4df4d9c2150843fecfba68我的DIV是这样的为什么会有一小缝隙?


回复讨论(解决方案)

这代码贴的看不出毛病来

*{margin:0;padding:0}看看这样行吗

图片的原因看不到效果,你试试楼上的重置
*{margin:0;padding:0}

img{ display:block;}
还有一种可能是margin导致空隙!

哎。。发现竟然是美工给我的图下面有一条线的原因我晕死

我想问下。。为什么我的25edfb22a4f469ecb59f1190150159c6列表里面的图片高度怎么给定呢。。我给定的有但是一直出现一半除非把图片改的非常小。。46d5fe1c7617e3914f214aaf043f4ccf
body{ border: 0px; margin:0;font-family : "Lucida Grande", Verdana, Lucida, Arial, Helvetica, 宋体,sans-serif;}
body,div,ul,form{padding:0;margin:0;list-style-type:none;}
ul{margin:0; padding:0; list-style:none;padding-bottom: 200px;}
#imgList{ width:770px; height:300px; /* 定义显示窗口的大小 */
 border:0px solid white; overflow:hidden}
#imgList ul{ width:1820px;} /* 定义全部图片的宽度和,这里有5张,每张宽100px,总宽度就是500px */
#imgList li{ width:220px; height:220px; float:left;} /* 单张图片的所在位置的大小,宽度就是图片宽度加左右边距 */
#imgList img{ width:200px; height:150px; margin:10px;} /* 单张图片的尺寸,及外边距 */ 这是我的CSS里面的。。

91f937eaada6926ed18745a63118ab8d
  00c8ee4bea1877c447d8d6bb8bb15da8
    31bff50dc5d62091405569d66bc667520b9826593ad26ae96ec4c2777b346133游戏94b3e26ee717c64999d7867364b1b4a3b90dd5946f0946207856a8a37f441edf
 fd273fcf5bcad3dfdad3c41bd81ad3e5
  a34de1251f0d9fe1e645927f19a896e8
    eb387ff7ca0d11caf4700033efa638d4
    d2e84ce9c4e64be3e729d179f7a3cade
     c2e2a16cbd8b4b5760cfd56468685087
267343aac431329b5d32b64d671343ad
05489f330f48def869e895d538b1d761
ff6d136ddc5fdfeffaf53ff6ee95f185
     25edfb22a4f469ecb59f1190150159c61b3adcac9d778bc53077cbc582d95ecd130050f3de6a0f01b9f2b16b6a545fb55db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
     25edfb22a4f469ecb59f1190150159c68e97e3f575cf61523c56eb8ec6b2c4c879090a760f20ea0fafc546785eb912935db79b134e9f6b82c0b36e0489ee08ed bed06894275b65c1ab86501b08a632eb
    25edfb22a4f469ecb59f1190150159c63164e62d20d175230bd2f13aa85aef0579090a760f20ea0fafc546785eb912935db79b134e9f6b82c0b36e0489ee08edbed06894275b65c1ab86501b08a632eb
   929d1f5ca49e04fdcb27f9465b944689
   ff6d136ddc5fdfeffaf53ff6ee95f185
    25edfb22a4f469ecb59f1190150159c6747546982ea94d8b24985d905674f312推推兔94b3e26ee717c64999d7867364b1b4a3bed06894275b65c1ab86501b08a632eb
    25edfb22a4f469ecb59f1190150159c6706e4bd14f3bd2b49ccff06117d86bb4啊 救命94b3e26ee717c64999d7867364b1b4a3bed06894275b65c1ab86501b08a632eb
    25edfb22a4f469ecb59f1190150159c6706e4bd14f3bd2b49ccff06117d86bb4啊 救命94b3e26ee717c64999d7867364b1b4a3bed06894275b65c1ab86501b08a632eb
   929d1f5ca49e04fdcb27f9465b944689
   16b28748ea4df4d9c2150843fecfba6816b28748ea4df4d9c2150843fecfba68
b90dd5946f0946207856a8a37f441edffd273fcf5bcad3dfdad3c41bd81ad3e5
f16b1740fad44fb09bfe928bcc527e08This is my code below. . . Why, great gods

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn