IE下無法顯示相對(duì)路徑的圖片但Chrome沒問題
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- 實(shí)現(xiàn)ie兼容 -->
<meta http-equiv="X-UA-Compatitle" content="IE=edge"/><!-- 瀏覽器的文檔模式按最新的ie來渲染 -->
<title>being search</title>
<style type="text/css">
body{background-color: #333;}
.bg-div{ width:1366px; height: 768px; background:url(/img/bg.png); margin:0 auto;position: relative;}
.logo{background-color:red; width:107px; height: 53px;float: left;margin:-4px 18px 0 0;}
form{float: left; background: #fff;padding:5px;
opacity:0.2;
filter:alpha(opacity=20); /* 針對(duì) IE8 以及更早的版本 */
}
form .search-input-text{border: 0;float: left;height:29px;line-height: 29px;outline:none;width: 350px;background: #fff;color:rgb(18, 21, 62);font-size: 25px;font-weight: bold;}
.search-input-button{border: 0;background: url(/img/02.png)no-repeat;width: 29px;height: 29px;float: left;}
.search-box{position: absolute;top: 200px;left: 300px;}
form:hover{opacity:0.6;filter:alpha(opacity=60); }
</style>
</head>
<body>
<div>
<div> <!-- 這一層用來實(shí)現(xiàn)logo和form的定位 -->
<div></div>
<form>
<input type="text"/>
<input type="submit" ?class="search-input-button" value=""/>
</form>
</div>
</div>
</body>
</html>
2016-10-24
遇到一個(gè)奇怪的問題,一張JPG圖片在ie(8)下無法正確顯示,但在firefox和chrome下可以正確顯示。
在確保路徑全部正確的情況下,懷疑是圖片本身存在問題。
經(jīng)確認(rèn),圖片是處理過的,并且模式使用的是CMYK,IE不支持此模式的圖片,需要把圖片切換到RGB模式。
百度的