首页 前端知识 html制作简易搜索框

html制作简易搜索框

2024-01-29 14:01:26 前端知识 前端哥 415 158 我要收藏

效果图:

代码:

<style type="text/css">
form .text {
display: inline-block;
border: 0;
width: 260px;
height: 35px;
font-size: 14px;
outline: none;
border: 2px solid #0084ff;
}
form .search {
width: 90px;
height: 38px;
border: 0;
outline: none;
cursor: pointer;
text-align: center;
line-height: 40px;
background-color: #0084ff;
color: #FFFFFF;
}
</style>
<form target="_blank" method="get" action="https://www.baidu.com/s">
<input type="text" placeholder="请输入关键词" name="word" class="text"/>
<input type="submit" value="搜索" class="search">
</form>
复制

 上面form标签能改搜索引擎,这里使用的是百度

转载请注明出处或者链接地址:https://www.qianduange.cn//article/772.html
标签
评论
发布的文章

HTML5 css3课后习题【一】

2024-02-10 19:02:20

css3 table表格

2024-02-10 19:02:01

CSS 基础知识 选择器

2024-02-10 19:02:50

float,flex和grid布局

2024-02-10 19:02:41

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!