- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我会再次将其显示为图像 :)
我正在设计一个搜索框,但我遇到了奇怪的错误..我的目标是让输入框和设置按钮看起来像一个。所以我用边框设计了它们。如果这两个元素之间没有间隙,它看起来还可以。而且按钮比输入框小 2px。这是我的 CSS
form#search
{
}
input[type=text]
{
width: 400px;
border-top: 1px solid rgb(217, 217, 217);
border-right: none;
border-bottom: 1px solid rgb(217, 217, 217);
border-left: 1px solid rgb(217, 217, 217);
height: 50px;
}
input[type=button]
{
font-family: 'WebSymbolsRegular';
width: 40px;
border-top: 1px solid rgb(217, 217, 217);
border-right: 1px solid rgb(217, 217, 217);
border-bottom: 1px solid rgb(217, 217, 217);
border-left: none;
background: white;
height: 50px;
}
input[type=submit]
{
font-family: 'WebSymbolsRegular';
height: 50px;
}
这是 sachleen 要求的 html。这里没什么特别的..
<form id="search">
<input type="text" name="search" placeholder="search" tabindex="1"/>
<input type="button" value="S" tabindex="3"/>
<input type="submit" value="L" tabindex="2"/>
</form>
我没有制定任何规则来弥补这些差距。添加边距或填充:0,没有任何改变。我也在使用 Eric Meyer 的“重置 CSS”2.0 来重置 css。
最佳答案
这对我有用
form {
border: 1px solid rgb(217, 217, 217);
width: 598px;
background: green;
font-size:0;
input {
padding: 0px;
border: 0px;
font-size:18px;
height: 30px;
background: white;
}
input[type='text'] {
width: 498px;
}
input[type='button'], input[type='submit'] {
width: 50px;
}
}
找到了最终的解决方案!并且在所有浏览器上都一样。键 - font-size: 0 ontainer(在本例中为表单),将填充设置为 0px,所有输入的高度相同。我将表单宽度设置为 598(+2 * 1 像素边框),我可以将输入宽度设置为总和 598。现在我不需要使用花哨的 display: box 和 float: left 来破坏一切。
关于css - 输入类型文本和输入类型按钮之间的差距,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13366969/
我无法消除 IE7 中列表项之间的差距。 HTML: row 1.1
我用 jquery mobile 开发了一个 Phonegap 应用程序。它是一个单页应用程序,具有固定的页眉、固定的页脚和从左侧打开的面板。内容 DIV 为白色,面板从其默认颜色加载。 问题是当面板
我在我当前的元素中使用了 bootstrap,它工作正常但只有一个故障: 我有 3 col-sm-6彼此相邻,当第二个col-sm-6比第一、第三长col-sm-6向左移动,第一个和第三个之间出现间隙
我目前正在创建一个网站。但是,我在缩小页面最右侧的边距差距时遇到了一些问题 As seen in this picture我尝试将 body 设置为 margin 0px,但这没有帮助。任何帮助都将不
我的 OpenLayers map 有问题。我无法让瓷砖一 block 挨着另一 block 。我已经检查过侵入式 CSS,但没有找到任何东西。有人可以帮我解决这个问题吗? 我目前的代码是这样的:
我在制作 时遇到了问题我页面的标题链接展开以填满整个 在我的网页中标记。下面似乎有一个缺口,我不知道如何修复它。 我的导航栏也有类似的问题,随着我增加浏览器的大小,它不断扩展。 尝试将鼠标悬停在这个
当使用 Xcode 11 beta 5 在 iOS 13 beta 6 上运行应用程序时,我在呈现搜索结果 View Controller 时遇到了奇怪的间隙: 以下是如何设置的一些内容: let s
(PostgreSQL 8.4) 继续我的 previous example ,我希望通过窗口函数进一步理解间隙和孤岛处理。考虑下表和数据: CREATE TABLE T1 ( id SERIAL
我正在开发 PWA 网站。必须通过单击主屏幕图标来启动应用程序。问题是将 iPhone 旋转到横向位置后出现 20px 间隙。这个间隙超出了 Window 对象,所以我无法用 js 或 css 处理它
我注意到当位置设置为绝对时,表格单元格垂直对齐不起作用。我做错了什么吗? 非工作 sample bottom alignament is
我尝试添加各种标签并尝试添加相对路径:'//' 这些是我尝试过的各种meta标签 我也尝试过为相对路径添加“//”。 execIframe.contentWindow.location
我有一个 CSS 嵌套菜单在 IE 8 和 Firefox 中完美运行,但在 IE7 中它会在元素之间产生一个小间隙。这是我的 CSS: #nav, #nav ul { margin: 0;
我正在尝试使用 SwiftUI 在 HStack 中有两个 View 。但是,我一直在两种观点之间存在差距。 该问题出现在纵向和横向布局中。 我的代码: struct ContentView: Vie
我的 svg 左侧有一个小缝隙,我一辈子都无法修复它。请参阅下图了解我所指的内容。在左侧,您可以稍微看到图像。 我在 Chrome 和 Firefox 上注意到这个问题。知道问题可能是什么吗? .aw
当我在 Visual Studio 2010 中创建一个全新的 ATL 项目时,资源 ID 102 和 105 被遗漏了。这是故意的还是错误?这些 ID 在项目后期有什么用吗?我可以重新排序编号以使用
我使用 JQuery Mobile+Phone Gap 实现了 TableView A Adam Kinkaid Alex Wickerham Avery Johnson B
我是一名优秀的程序员,十分优秀!