gpt4 book ai didi

jQuery UI Reizable 大小问题与 box-sizing :border-box

转载 作者:行者123 更新时间:2023-11-28 07:54:21 25 4
gpt4 key购买 nike

我对 Jquery UI Resizable with box-sizing: border-box 有疑问。如果删除 box-sizing 它将按预期工作。

  1. 点击可调整大小
  2. 输入元素将显示错误的大小。

请帮我检查问题。

图片:http://i.stack.imgur.com/RhNpI.jpg

HTML:

<button id="resizeBtn">Make Resizable</button>

<div class="canvas ui-draggable ui-draggable-handle ui-selectee" id="56cec649-f945-4f7e-87bd-c95abcae95e7_ui-id-2" style="position: absolute; top: 77px; left: 242px;">
<div style="padding: 5px; border-radius: 7px; cursor: default;" class="elementContainer ui-selectee">
<label class="canvas-span ui-resizable-autohide ui-resizable ui-selectee" id="label_56cec649-f945-4f7e-87bd-c95abcae95e7_ui-id-2">Click here to change
<div class="ui-resizable-handle ui-resizable-e ui-selectee" style="z-index: 90; display: none;"></div>
<div class="ui-resizable-handle ui-resizable-s ui-selectee" style="z-index: 90; display: none;"></div>
<div class="ui-resizable-handle ui-resizable-se ui-icon ui-icon-gripsmall-diagonal-se ui-selectee" style="z-index: 90; display: none;"></div>
</label>
<input style="width: 200px; height: 30px; display: block; margin: 0px; position: relative; zoom: 1; top: auto; left: auto;" class="k-textbox ui-selectee" id="input_56cec649-f945-4f7e-87bd-c95abcae95e7_ui-id-2" />
</div>
</div>

JS:

$('#resizeBtn').click(function() {
$("#input_56cec649-f945-4f7e-87bd-c95abcae95e7_ui-id-2").resizable();
});

CSS:

/*** reset style from bootstrap***/
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}

/*****Custome style *****/
.canvas {
margin-top: 10px;
display: inline-block;
}

这是上述代码的链接示例:http://jsfiddle.net/73amaegf/1/

最佳答案

好的,我更新你的 jsfiddle

CSS

input.k-textbox{
height: 30px !important; // Adjust your needs
}

DEMO HERE

关于jQuery UI Reizable 大小问题与 box-sizing :border-box,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30212933/

25 4 0
文章推荐: html - Div 在屏幕尺寸变化时移动
文章推荐: c++ - QWebView中的登出功能
文章推荐: ios - 忽略 Completable 上的错误 - RxSwift
文章推荐: jquery - 确定
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com