gpt4 book ai didi

css - jQuery 移动按钮拉伸(stretch)太远

转载 作者:太空宇宙 更新时间:2023-11-04 15:58:10 27 4
gpt4 key购买 nike

由于某种原因,当我调整浏览器窗口的大小时,文本字段下方的按钮似乎变得比文本框更宽。有什么想法吗?

SCRN:

enter image description here

HTML :

   <!DOCTYPE html>
<html>
<head>
<title>Title</title>
<script src="scripts/ajax.js"></script>
<link rel="stylesheet" href="css/custom.css" />
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.css" />
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.1.0/jquery.mobile-1.1.0.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<div data-role='page' id='confirmDetails' data-add-back-btn='true' data-theme='a'>
<div data-role='header' data-position='fixed'><h1>Confirm Details</h1></div>
<div class='ui-body ui-body-e'><p><strong>Please recheck your details to make sure they are correct, then press confirm.</strong></p></div>
<div data-role='content'>
<div><label>Name</label><input type='text' value='Some factor name' disabled /></div>
<div><label>VAT No</label><input id='txtFVATNo' type='text' value='121212121' placeholder='vat no' /></div>
<div><label>Email</label><input id='txtFEmail' type='email' value='a@b.com' autocapitalize='none' placeholder='email address' /></div>
<div><label>Name</label><input id='txtFContactName' type='text' value='Muhammad' autocapitalize='words' placeholder='contact name' /></div>
<input type='submit' id='btnConfirm' value='Everything Correct - Confirm!' data-icon='check' data-iconpos='right' /></div>
</div>
</body>
</html>

编辑:

将#confirmButton 的自定义 css 设置为宽度 97% 无效,

这也不起作用:

-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;

这是按钮的 CSS:

webkit-appearance: none;
-webkit-box-align: center;
-webkit-rtl-ordering: logical;
-webkit-user-select: text;
background-attachment: scroll;
background-clip: border-box;
background-color: rgba(255, 255, 255, 0);
background-image: none;
background-origin: padding-box;
border-bottom-color: black;
border-bottom-style: none;
border-bottom-width: 0px;
border-left-color: black;
border-left-style: none;
border-left-width: 0px;
border-right-color: black;
border-right-style: none;
border-right-width: 0px;
border-top-color: black;
border-top-style: none;
border-top-width: 0px;
box-sizing: border-box;
color: black;
cursor: pointer;
display: block;
filter: none;
font-family: Helvetica, Arial, sans-serif;
font-size: 1px;
font-style: normal;
font-variant: normal;
font-weight: normal;
height: 39px;
left: 0px;
letter-spacing: normal;
line-height: normal;
margin-bottom: 0px;
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
opacity: 0.10000000149011612;
padding-bottom: 1px;
padding-left: 6px;
padding-right: 6px;
padding-top: 1px;
position: absolute;
text-align: center;
text-decoration: none;
text-indent: -9999px;
text-shadow: none;
text-transform: none;
top: 0px;
white-space: pre;
width: 391px;
word-spacing: 0px;
z-index: 2;

屏幕截图(因为我头疼):

enter image description here

解决方案:

这适用于最新的 1.1.0 版本。

input.ui-input-text, textarea.ui-input-text {
width: 100% !important; /* used to be width: 97%; */
/* add box sizing so padding is included in width */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}​

最佳答案

jquery.mobile-1.1.0.min.css 中,input.ui-input-text、textarea.ui-input 之间存在宽度、填充和边距的冲突组合-text.ui-btn,这就是它们显示不同的原因。

将 css 更改为以下内容:

.ui-btn {
....
margin: 0.5em 0; /* used to be margin: 0.5em 5px; */
....
}

input.ui-input-text, textarea.ui-input-text {
....
width: 100% !important; /* used to be width: 97%; */
/* add box sizing so padding is included in width */
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
....
}

这应该可以解决您的问题:http://jsfiddle.net/RVgnC/5/

关于css - jQuery 移动按钮拉伸(stretch)太远,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10171814/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com