html 为什么在ie里显示正常在360浏览器不正常呢?
360iehtml代码<!DOCTYPE><html><head><linkrel="stylesheet"type="text/css"href="css\搜索框.cs...
360
ie
html代码
<!DOCTYPE>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css\搜索框.css"/>
</head>
<body>
<div class="search_box">
<h3>站内搜索</h3>
<div class="content">
<form method="post" action="">
<select>
<option value="">影视</option>
<option value="">日志</option>
<option value="">相册</option>
</select>
<input type="text" placeholder="请输入关键字"/><button type="submit">搜索</button>
<div class="search_tips">
<h4>搜索提示</h4>
<ul>
<li><a href="#">柯南 365集</a><span>共有253个结果</span></li>
<li><a href="#">柯南剧场版</a><span>共有4563个结果</span></li>
<li><a href="#">柯南</a><span>共有45623</span></li>
</ul>
</div>
</form>
</div>
<div>
</body>
</html>
css代码
.search_box
{
position:relative;
width:360px;
}
.search_box *
{
margin:0;
padding:0;
list-style:none;
font:normal 12px/1.5em "宋体", Verdana, Lucida, Arial, Helvetica;
}
.search_box h3, .search_tips h4
{
display:none;
}
.search_box select
{
float:left;
width:60px;
}
.search_box input
{
float:left;
width:196px;
height:14px;
padding:1px 2px;
margin:0 5px;
border:1px solid #619FCF;
}
.search_box button
{
float:left;
width:59px;
height:18px;
text-indent:-9999px;
border:0 none;
cursor:pointer;
}
.search_tips
{
position:absolute;
top:17px;
left:65px;
width:190px;
padding:5px 5px 0;
border:1px solid #619FCF;
}
.search_tips li
{
float:left;
width:100%;
height:22px;
line-height:22px;
}
.search_tips li a
{
float"left;
text-decoration:none;
color:#333333;
}
.search_tips li a:hover
{
color:#FF0000;
}
.search_tips li span
{
float:right;
color:#CCCCCC;
} 展开
ie
html代码
<!DOCTYPE>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css\搜索框.css"/>
</head>
<body>
<div class="search_box">
<h3>站内搜索</h3>
<div class="content">
<form method="post" action="">
<select>
<option value="">影视</option>
<option value="">日志</option>
<option value="">相册</option>
</select>
<input type="text" placeholder="请输入关键字"/><button type="submit">搜索</button>
<div class="search_tips">
<h4>搜索提示</h4>
<ul>
<li><a href="#">柯南 365集</a><span>共有253个结果</span></li>
<li><a href="#">柯南剧场版</a><span>共有4563个结果</span></li>
<li><a href="#">柯南</a><span>共有45623</span></li>
</ul>
</div>
</form>
</div>
<div>
</body>
</html>
css代码
.search_box
{
position:relative;
width:360px;
}
.search_box *
{
margin:0;
padding:0;
list-style:none;
font:normal 12px/1.5em "宋体", Verdana, Lucida, Arial, Helvetica;
}
.search_box h3, .search_tips h4
{
display:none;
}
.search_box select
{
float:left;
width:60px;
}
.search_box input
{
float:left;
width:196px;
height:14px;
padding:1px 2px;
margin:0 5px;
border:1px solid #619FCF;
}
.search_box button
{
float:left;
width:59px;
height:18px;
text-indent:-9999px;
border:0 none;
cursor:pointer;
}
.search_tips
{
position:absolute;
top:17px;
left:65px;
width:190px;
padding:5px 5px 0;
border:1px solid #619FCF;
}
.search_tips li
{
float:left;
width:100%;
height:22px;
line-height:22px;
}
.search_tips li a
{
float"left;
text-decoration:none;
color:#333333;
}
.search_tips li a:hover
{
color:#FF0000;
}
.search_tips li span
{
float:right;
color:#CCCCCC;
} 展开
展开全部
需要ie和webkit类浏览器兼容
css:
<style>
.search_box {
position: relative;
width: 360px;
overflow: visible;
}
.search_box * {
margin: 0;
padding: 0;
list-style: none;
font: normal 12px/1.5em "宋体", Verdana, Lucida, Arial, Helvetica;
}
.search_box .clear {
width: 0;
height: 0;
clear: both;
line-height: 0;
overflow: hidden;
font-size: 0;
}
.search_box h3, .search_tips h4 {
display: none;
}
.search_box select {
float: left;
width: 60px;
height: 18px;
}
.search_box input {
float: left;
width: 202px;
width: 196px \9;
height: 18px;
line-height: 18px;
padding: 0 2px;
margin: 0 5px;
border: 1px solid #619FCF;
}
.search_box button {
float: left;
width: 59px;
height: 18px;
text-indent: -9999px;
border: 0 none;
cursor: pointer;
}
.search_tips {
position: absolute;
top: 17px;
top: 19px \9;
left: 65px;
width: 190px;
padding: 5px;
border: 1px solid #619FCF;
}
.search_tips ul, .search_tips ul li {
overflow: hidden;
}
.search_tips li a {
float: left;
text-decoration: none;
color: #333333;
display: inline;
height: 22px;
line-height: 22px;
}
.search_tips li a:hover {
color: #FF0000;
}
.search_tips li span {
float: right;
display: inline;
color: #CCCCCC;
height: 22px;
line-height: 22px;
}
</style>
html:
<div class="search_box">
<h3>站内搜索</h3>
<div class="content">
<form method="post" action="">
<select>
<option value="">影视</option>
<option value="">日志</option>
<option value="">相册</option>
</select>
<input type="text" placeholder="请输入关键字"/>
<button type="submit">搜索</button>
<div class="search_tips">
<h4>搜索提示</h4>
<ul>
<li><a href="#">柯南 365集</a><span>共有253个结果</span></li>
<li><a href="#">柯南剧场版</a><span>共有4563个结果</span></li>
<li><a href="#">柯南</a><span>共有45623</span></li>
</ul>
</div>
</form>
<div class="clear"></div>
</div>
<div class="clear"></div>
</div>
希望能帮助你
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
说到底还是各浏览对于同一个元素,默认的初始样式有些差异,你可以在做页面的时候初始化一下Css,再重新为元素加css样式,这样就可以保证在不同浏览器下能得到统一的效果
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询