gpt4 book ai didi

html - 如何将下拉框移到顶部

转载 作者:太空宇宙 更新时间:2023-11-04 02:19:13 25 4
gpt4 key购买 nike

我已经使用 kendo-ui 在我的 blog 中实现下拉菜单如您所见,我想将框向上移动而不影响帖子。当我添加代码 margin-top:20px; 但它没有任何其他方法可以向上移动框。

喜欢This

<!doctype html>



<style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>

<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.2.607/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.2.607/styles/kendo.material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.2.607/styles/kendo.default.mobile.min.css" />

<script src="//kendo.cdn.telerik.com/2016.2.607/js/jquery.min.js"></script>
<script src="//kendo.cdn.telerik.com/2016.2.607/js/kendo.all.min.js"></script>



<div id="example" role="application">
<div id="tshirt-view" class="demo-section k-content">

<h4 style="margin-top: 2em;">T-shirt Size</h4>
<select id="size" placeholder="Select size..." style="width: 300px;" >
<option />X-Small
<option />Small
<option />Medium
<option />Large
<option />X-Large
<option />2X-Large
</select>


</div>

<script>
$(document).ready(function() {
// create ComboBox from input HTML element

// create ComboBox from select HTML element
$("#size").kendoComboBox();


var select = $("#size").data("kendoComboBox");



});
</script>
</div>




</!doctype>

最佳答案

<!doctype html>



<style>html { font-size: 14px; font-family: Arial, Helvetica, sans-serif; }</style>

<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.2.607/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.2.607/styles/kendo.material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.2.607/styles/kendo.default.mobile.min.css" />

<script src="//kendo.cdn.telerik.com/2016.2.607/js/jquery.min.js"></script>
<script src="//kendo.cdn.telerik.com/2016.2.607/js/kendo.all.min.js"></script>



<div id="example" role="application">
<div id="tshirt-view" class="demo-section k-content">

<h4 style="margin-bottom: .5em;">T-shirt Size</h4>
<select id="size" placeholder="Select size..." style="width: 300px;" >
<option />X-Small
<option />Small
<option />Medium
<option />Large
<option />X-Large
<option />2X-Large
</select>


</div>

<script>
$(document).ready(function() {
// create ComboBox from input HTML element

// create ComboBox from select HTML element
$("#size").kendoComboBox();


var select = $("#size").data("kendoComboBox");



});
</script>
</div>




</!doctype>

关于html - 如何将下拉框移到顶部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38388726/

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