简体   繁体   English

如何使下拉菜单仅显示一半或四分之一窗口大小?

[英]How do I make it so that a drop-down menu only shows at half or quarter window size?

Like on IGN I would like to make it so that within my E-Magazine I can change the top tabs from the line layout, to a drop down menu, like IGN does when the website window is made too small.就像在IGN 上一样,我想在我的电子杂志中将顶部选项卡从行布局更改为下拉菜单,就像 IGN 在网站窗口过小时所做的那样。

I haven't tried this, I have researched it but haven't found anything that I have felt comfortable trying.我没有尝试过这个,我已经研究过它,但没有发现任何让我感到舒服的尝试。 However, here is the current code I have:但是,这是我拥有的当前代码:

 <h5 id="tabdiv"> <a href="index.html">Home</a> &emsp;&emsp; <a href="reviews.html">Reviews</a> &emsp;&emsp; <a href="interviews.html">interviews</a> &emsp;&emsp; <a href="apply.html">Apply</a> &emsp;&emsp; <a href="login register.html">Login / Sign Up</a>

And here is the output of the code.是代码的输出。

Here is an example of how to make a dropdown with HTML这是如何使用 HTML 创建下拉列表的示例

 select.example { max-width: 15%; }
 <select class="example"> <option value="stackoverflow">Stackoverflow</option> <option value="google">Google</option> <option value="yahoo">Yahoo</option> <option value="wired">Wired</option> <option value="theoatmeal">The Oatmeal</option> </select>

With your stuff being in an E-zine, the style="" tag will probably have to be utilized.如果您的内容在电子杂志中,则可能必须使用style=""标签。 <select class="example" style="max-width: 15%;">


Without knowing more all I can do it give you basics that you should honestly know before you even post here.在不了解更多信息的情况下,我可以为您提供一些基础知识,您甚至在在这里发帖之前就应该诚实地了解这些基础知识。 You have to learn and make your own attempt so we can see what you need exactly.您必须学习并进行自己的尝试,这样我们才能准确了解您的需求。

Posting un-related code that is contrary to what you're trying to do doesn't really help us help you much.发布与您正在尝试做的事情相反的不相关代码并不能真正帮助我们为您提供多少帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 从SuiteScript的下拉菜单中选择选项后,如何显示文本框? - How do I make a text box appear after selecting an option from a drop-down menu in SuiteScript? 如何做垂直下拉菜单? - How to do a vertical drop-down menu? 如何使div进入Bootstrap下拉菜单 - How do I make a div to a Bootstrap drop-down 如何使下拉菜单出现在幻灯片上? - How to make drop-down menu appear over slideshow? 如何在NetSuite中动态更改下拉菜单 - How to make dynamically changing drop-down menu's in NetSuite 如何使用javascript中的php制作动态下拉菜单? - How to make a dynamic drop-down menu with php in javascript? 如何将我的选项设置为默认选项,因此如果我清除下拉菜单,默认情况下将填充该选项 - How to make my option a default so if I clear my drop-down it is populated by the default Excel VBA - 如何使用 Selenium (Javascript) 通过下拉菜单移动? - Excel VBA - How do I move by a drop-down menu with Selenium (Javascript)? 如何使用“发布”方法将所有选定的数据从下拉菜单发送到服务器? - How do I send all selected data from the drop-down menu to the server with a “post” method? 如何基于从下拉菜单中选择的选项以HTML显示文本? - How do I display Text in HTML based on an option selected from a Drop-Down Menu?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM