简体   繁体   English

最大宽度为 768px 时如何通过 flexLayout 隐藏 Div

[英]How to hide a Div by flexLayout when max-width is 768px

I want to hide my div when max-width of the page is 768px(Tablet width) but I checked API reference of flexLayout and says that limits are 600,960,1280 and 1980 px.Is there any way I can override these pixel limits to change as 768px?fxHide.gt-sm,hides after 960px but I need to make it 768px for example.当页面的最大宽度为 768 像素(平板电脑宽度)时,我想隐藏我的 div,但我检查了 flexLayout 的 API 参考并说限制是 600,960,1280 和 1980 像素。有什么办法可以覆盖这些像素限制以进行更改作为 768px?fxHide.gt-sm,隐藏在 960px 之后,但我需要将其设为 768px。

API reference: https://github.com/angular/flex-layout/wiki/Responsive-API API 参考: https://github.com/angular/flex-layout/wiki/Responsive-API

Try this in your CSS file在你的 CSS 文件中试试这个

@media only screen and (max-width: 768px) {
  div {
  display:none;
}

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

相关问题 @media 屏幕和 (max-width:768px) 不起作用 - @media screen and (max-width:768px) not working 如何让@media(max-width 425px) 单独工作,而不是跟随@media(max-width 768px) - How to get @media(max-width 425px) to work alone, and not follow @media(max-width 768px) 当show hide bootstrap 3 offcanvas在媒体宽度&gt; 768px时的CSS3动画 - CSS3 animations when show hide bootstrap 3 offcanvas in media width > 768px 当宽度小于768像素时,如何防止Bootstrap塌陷到移动视图中? - How do I prevent Bootstrap from collapsing into mobile view when width is below 768px? 屏幕低于768像素时将div项居中吗? - Centering div items when screen is under 768px? 当页面宽度为768px时如何替换按钮的内容? - How to replace the contents of a button when the page has a width of 768px? 使div CSS宽度1366px高度768px适合父div - make div css width 1366px height 768px fit the parent div CSS-媒体查询的最大宽度设置为以729px隐藏div但以657px隐藏 - CSS - Media Query max-width set to hide div at 729px but hides at 657px 响应式jQuery不起作用:在768px宽度以下单击,并将鼠标悬停在768px以上 - Responsive jQuery doesn't work: Click below 768px width and hover above 768px Bootstrap 3-减少 <div> 小型设备的电话的宽度正确(&lt;768px) - Bootstrap 3 - reduce <div> width for Extra small devices Phones (<768px) properly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM