html制作百度首页hover,前端开发 设计一个_百度搜索提示框

/p>

前端开发的设计思路:百度搜索提示框

* {

margin: 0;

padding: 0;

outline: none;

}

.search101 {

width: 650px;

margin: 300px auto;

font-size: 0;

}

.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;

}

var txtObj = document.getElementById(“alertSpan”);

function show(str) {

txtObj.innerHTML = str;

}

var params = {

“XOffset”: 0, //提示框位置横向偏移量,单位px

“YOffset”: 0, //提示框位置纵向偏移量,单位px

“width”: 204, //提示框宽度,单位px

“fontColor”: “#666”, //提示框文字颜色

“fontColorHI”: “#222”, //提示框高亮选择时文字颜色

“fontSize”: “16px”, //文字大小

“fontFamily”: “微软雅黑”, //文字字体

“borderColor”: “#d8d8d8”, //提示框的边框颜色

“bgcolorHI”: “#e8e8e8”, //提示框高亮选择的颜色

“sugSubmit”: true, //在选择提示词条是是否提交表单

};

BaiduSuggestion.bind(“ipt1”, params, show);

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值