creating invisible text fields in html?(在 html 中创建不可见的文本字段?)
问题描述
我正在尝试将 html 代码放入我老板提供的设计模型中,其中一些美学 - 例如搜索栏的形状有点奇怪和复杂.作为一个简单的解决方法,我想我只需在搜索栏的图像上放置一个文本字段,但我无法让它工作.
I'm trying to put html code to a design mockup my boss provided, and some of the aesthetics - the shape of the search bar, for example, are a little bit bizarre and complex. As an easy fix, I thought I would simply put a text field over an image of the search bar, but I can't get it to work.
谁能建议一种在图像上添加文本字段的方法,使其不可见但仍然有效?
Can anyone suggest a way to layer a text field over an image, leaving it invisible but still functional?
推荐答案
就隐身而言,把这个 CSS 放在你的输入上:
As far as the invisibility goes, put this CSS on your input:
input {
background: transparent;
border: none;
}
查看这个 jsFiddle,它展示了这一点.就定位输入而言,您应该能够正常处理.
Check out this jsFiddle that shows this in action. As far as positioning the input goes, you should be able to handle that normally.
这篇关于在 html 中创建不可见的文本字段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 html 中创建不可见的文本字段?


- Fetch API 如何获取响应体? 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- 失败的 Canvas 360 jquery 插件 2022-01-01