Home >Web Front-end >HTML Tutorial >The line-height style is invalid and the text cannot be centered_html/css_WEB-ITnose

The line-height style is invalid and the text cannot be centered_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:50:091096browse

line-height style is invalid

This is why I haven’t found the reason after tinkering for a long time

<!doctype html><html><head>	<meta charset="utf-8">	<title>淘宝</title>		<link href="images/taobao.jpg" >	<style type="text/css">		*{			margin:0;			padding:0;		}		ul ,li ,a{			margin:0;			padding:0;		}			a{		 			text-decoration:none;			font-size:10px;			color:#333;			}	 		li{			list-style:none;		}		img{			border:none;		}		body{			color:#000;			overflow:hidden;						}					/* 顶部样式 */		.topbg{			background:#eee;			height:35px;		} 		.top{						position:absolute; left:50%; width:1190px; margin-left:-595px;					}		.topleft{			height:35px;			float:left;		}		.topleft li {			display:inline-block;			height:35px;			line-height:35px;		}	</style></head><body>	<!-- 顶部内容 -->	<div class="topbg">		<div class="top">			<ul class="topleft">				<li><a href="#" style="color:red;">亲,请登录</a></li>				<li><a href="#">免费注册</a></li>				<li><a href="#">手机逛淘宝</a></li>				<li><a href="#"><img src="images/top.gif"/></a></li>			</ul>					</div>			</div>	<!-- 正文部分 -->	<div class="main"></div>	<!-- 底部内容 -->	<div class="bottom"></div></body></html>

 

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