猿问

为啥这里的“sign in”“sign up”不是水平显示的,而是垂直显示的?

<!DOCTYPE html>
<html>
<head>
    <title>   </title>
<style type="text/css">
ul{
    margin: 0;
    padding:0;
    width:66px;
    height:32px;
    border-radius:10px;
    position:absolute;
    left:225px;
    top: 10px;
}
#li1{float: left;display: table-cell;}
#li2{float: right;display: table-cell;}
body{font-family:"Microsoft Yahei";}


</style>
</head>
<body>
<h1>Enigmatico</h1>
<ul>
<li1 style="color:white;background-color:#171717">sign in</li1>
<li2 style="color:white;background-color:#8f3232">sign up</li2>
</ul>
</body>
</html>

油桃大人
浏览 1369回答 1
1回答

HiFrontend

<li1 这里标签就错了,应该是<li id="li1">....<li><li id="li2">....<li>
随时随地看视频慕课网APP
我要回答