【发布时间】:2021-01-18 01:18:53
【问题描述】:
在我正在尝试构建的网站 (https://www.dynomotion.com/test/index-search.htm) 上,我遇到了 2 个问题:
- 光标没有完全集中在搜索框内
- 没有 1px 灰色底边框
有人知道我做错了吗?
对于搜索的样式,我使用以下css:
#cse-search-form {
position: relative;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
background: #f2f2f2;
padding: 0;
margin:0;
}
.gsc-search-box-tools .gsc-search-box .gsc-input .gsc-input-box,
.gsc-search-box-tools .gsc-search-box .gsc-input .gsc-input-box-focus {
height: 25px;
-webkit-border-top-left-radius: 0;
-webkit-border-bottom-left-radius:0;
-moz-border-radius-topleft: 0;
-moz-border-radius-bottomleft: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
border: 1px solid #dadada;
padding: 0;
margin:0;
}
任何指针将不胜感激!
谢谢
【问题讨论】:
-
光标确实显示,但您的输入元素未正确定位。 See here
-
您的输入元素中有一个表格...
-
你是对的:光标显示,但位置不正确。据我所知,css 只说搜索字段的高度应为 15px,外加 3px 填充。在哪里以及如何指定光标位置?
-
嗨!我仍然没有解决这个问题。有人可以帮忙吗?必须有两种冲突的样式或光标未进入搜索框的内容。请帮忙!
标签: css search google-search