简体   繁体   English

当我调整窗口大小时,如何在导航栏上更改li标签的值/内容?

[英]How to change the value/content of my li tag on my navbar when i resized the window?

Good day Sir/Maam.. 先生/女士,早上好..

i just want to ask and get some idea from your opinion that you can give or if possible the exact code :) . 我只是想问一下你的意见,你可以给出或者如果可能的确切代码:)。 im working on my first website design and i have this problem which is how to change the value or content of my navbar when i full re-sized back my window. 我在我的第一个网站设计工作,我有这个问题,当我完全重新调整我的窗口大小时,如何更改我的导航栏的值或内容。 I dont have any idea how i could solve this.. so plss need help here.. thank you! 我不知道如何解决这个问题..所以这里需要帮助..谢谢!

this is the output of my sample Project 这是我的示例项目的输出

my navbar in full resized 我的导航栏已完全调整大小 在此输入图像描述

my navbar when i resized in max-width 580px and clicked the menu bar 当我在最大宽度580px中调整大小并单击菜单栏时,我的导航栏 在此输入图像描述

this is what it looks like when i full resized it again and gives me a hard time to think to turned it to normal.. 这就是我再次完全调整大小时的样子,让我很难想到把它变成正常的... 在此输入图像描述

sorry for my bad english.. hope to understand my problem and give some idea to solve this.. thanks a lot! 对不起我的英语不好..希望了解我的问题并给出一些想法来解决这个问题..非常感谢!

if you need to do as exactly a in the pictures use CSS 如果你需要像照片中那样使用CSS

@media only screen and (max-width: 768px) { 

.your_class{
font-size:0px;
}
}

change width according to needs. 根据需要改变宽度。 You can also use min-width. 你也可以使用最小宽度。

you could look for css media queries: 你可以寻找css媒体查询:

 @media (max-width: 600px) { li span { /* on mobile screens span will be hidden try resizing. */ display: none; } } 
 <ul> <li>icon <span>users</span></li> <li>icon <span>profile</span></li> <li>icon <span>mail</span></li> </ul> 

暂无
暂无

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

相关问题 调整窗口大小后如何使我的网站停留 - How can I make my website stay when window is resized 当导航栏变粘时,如何更改 li 颜色? - How can I change li color when the navbar become sticky? 当窗口调整大小时,如何更改div的左边距? - How can i change the left margin of a div when the window is resized? 我怎样才能做我的第一个<LI>标签在排序中动态变化时着色 - How can i make my first <LI> Tag to be colored when it dynamically changes in sorting p5js:当 window 调整大小时,如何使我的随机生成的圆形包装草图/画布响应? - p5js: How do I make my randomly generated circle packing sketch/canvas responsive when the window is resized? 调整浏览器窗口大小时如何更改正文宽度,以使内容易于阅读? - How to change the body width when the browser window is resized, so that the content is easily read? 如何在不影响我的跨度标签的情况下删除li标签的值 - How to remove the value of my li tag without affecting my span tag 调整大小后,我的页脚将不会保留在浏览器窗口的底部 - My footer will not remain at the bottom of the browser window when it is resized 当窗口调整得更小时,为什么我的引导按钮会重叠 - Why does my bootstrap button overlap when window is resized smaller 如何在画布上按比例绘制我的图像,但在调整窗口大小时不留下任何边框 - How to get my image drawn on a canvas proportionally, yet not leave any borders when the window is resized
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM