Home > Backend Development > PHP Tutorial > 一个简单的HTML有关问题

一个简单的HTML有关问题

WBOY
Release: 2016-06-13 13:10:10
Original
789 people have browsed it

弱弱的问一个简单的HTML问题
这几天一直在纠结一个问题 尽管没有什么影响 但是总还是惦记着:
代码


     

  •  


     


样式
.userlist{display:block;padding:0;margin:0;overflow:hidden;border:1px solid red;}
.userlist li{float:left;display:block;border:1px solid red; }
.userlist p{display:block;float:left;width:10px;height:10px;overflow:hidden; border:1px solid red; }

如此简单的代码啊啊啊啊!!!把我难住了 为什么我的p标签无法到达li的顶端而是在中间?????

------解决方案--------------------
p元素是旧产物,放弃它吧

印象中mozilla的块状元素内容是垂直居中的

好久没写html,都快忘光了
------解决方案--------------------
*{padding:0;margin:0;} 受教了....
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template