<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>百度搜索提示框
</title>
<style>
* { margin: 0;padding: 0; outline: none;}
.search101 {
width: 650px;
margin: 300px auto;
font-size: 0;
}
body{background: url(http://talent.baidu.com/external/baidu/images/home/home-black-bg.jpg);}
.sou1 {
width: 514px;
height: 40px;
color: #666;
font: 16px Microsoft YaHei;
border: 1px solid rgba(170,170,170,.9);
border-right: 0;
border-radius: 2px 0 0 2px;
background: rgba(255,255,255,.9);
padding: 0 30px 0 3px;
vertical-align: top;
display: inline-block;
transition: .2s;
}
.sou2 {
width: 100px;
height: 42px;
font: 16px Microsoft YaHei;
color: rgba(255,255,255,.9);
background: rgba(0,170,240,1);
border: 0;
border-left: 1px solid rgba(0,170,240,1);
border-radius: 0 2px 2px 0;
margin: 0 0 0 -1px;
vertical-align: top;
transition: .3s;
display: inline-block;
cursor: pointer;
}
.sou2:hover {
background: rgba(0,140,220,.9);
}
.sou1:focus {
color: #333;
border: 1px solid rgba(0,170,240,1);
border-right: none;
}
</style>
</head>
<body>
<h1 style="position: absolute;left: 41%;top: 20%;"><img style="width: 200px;" src="https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/logo_white.png"></h1>
<div class="search101">
<form action="http://www.baidu.com/baidu" class="search-form" method="" id="search-form">
<input id="ipt1" name="tn" type="hidden" value="baidu" >
<input type="text" id="sou1" class="sou1" name="word" maxlength="8048" value="" placeholder="" baiduSug=1 onmouseover="focus()">
<input type="submit" class="sou2" value="百度一下" >
</form>
</div>
<script charset="gbk" src="http://www.baidu.com/js/opensug.js"></script>
<script>
document.getElementById("sou1").focus();
var txtObj = document.getElementById("alertSpan");
function show(str){
txtObj.innerHTML = str;
}
var params = {
"XOffset": 0,
"YOffset": 10,
"width": 204,
"fontColor": "#333",
"fontColorHI": "#222",
"fontSize": "14px",
"fontFamily": "微软雅黑",
"borderColor": "#d8d8d8",
"bgcolorHI": "orange",
"sugSubmit": true,
};
BaiduSuggestion.bind("ipt1",params,show);
</script>
</body>
</html>
转载请注明原文地址: https://www.6miu.com/read-13877.html