javascript - 我需要直接在右侧使用提交按钮对电子邮件输入进行编码(包括图像)

标签 javascript jquery html css

我需要像这样并排创建一个输入槽/按钮。

它们需要响应浏览器的大小(两侧边距均为 35 像素)。这是针对移动网站的。

enter image description here

我该怎么做?

最佳答案

开始吧:您需要像这样设置按钮的样式:随意在内部设置更多样式。 工作代码:http://jsfiddle.net/73DD2/2/

字段:

<input type="text"value="email address"><input type="submit" value="submit">

风格:

input[type="text"] {
    position: absolute;
    top: 20px;
    width: 70%;
    left: 30px;
    z-index: 2;
    height: 30px;
    -webkit-border-top-left-radius: 10px;
    -webkit-border-bottom-left-radius: 10px;
    -moz-border-radius-topleft: 10px;
    -moz-border-radius-bottomleft: 10px;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border: 1px solid #CCC;
}
input[type="submit"] {
    text-align: right;
    position: absolute;
    top: 20px;
    width: 30%;
    right: 30px;
    z-index: 1;
    -webkit-border-top-right-radius: 10px;
    -webkit-border-bottom-right-radius: 10px;
    -moz-border-radius-topright: 10px;
    -moz-border-radius-bottomright: 10px;
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    border: 1px solid #CCC;
    height: 34px;
}

关于javascript - 我需要直接在右侧使用提交按钮对电子邮件输入进行编码(包括图像),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20598238/

相关文章:

javascript - jQuery.load() 不适用于定义的函数作为回调?

html - Bootstrap 向下滚动标题背景

javascript - jQuery 获取设备的地理位置?

javascript - 页面加载后div消失

javascript - jquery cookie 变量没有更新

javascript - Footables 列排序会重复表中的行,为什么?

javascript - 未捕获的类型错误 : Object #<Object> has no method 'closest'

javascript - 图像出现在另一图像之上/之上?

javascript - Ajax图像从html文件上传到codeigniter Controller - 空白$_FILES数组

javascript - 格式化日期时间 JavaScript