• <legend id='jlxQC'><style id='jlxQC'><dir id='jlxQC'><q id='jlxQC'></q></dir></style></legend>

      <tfoot id='jlxQC'></tfoot>

      <small id='jlxQC'></small><noframes id='jlxQC'>

      • <bdo id='jlxQC'></bdo><ul id='jlxQC'></ul>

      1. <i id='jlxQC'><tr id='jlxQC'><dt id='jlxQC'><q id='jlxQC'><span id='jlxQC'><b id='jlxQC'><form id='jlxQC'><ins id='jlxQC'></ins><ul id='jlxQC'></ul><sub id='jlxQC'></sub></form><legend id='jlxQC'></legend><bdo id='jlxQC'><pre id='jlxQC'><center id='jlxQC'></center></pre></bdo></b><th id='jlxQC'></th></span></q></dt></tr></i><div id='jlxQC'><tfoot id='jlxQC'></tfoot><dl id='jlxQC'><fieldset id='jlxQC'></fieldset></dl></div>
      2. 如何仅禁用一个组件的主体样式

        how can i disable a body style for only one component(如何仅禁用一个组件的主体样式)

          <legend id='OddVU'><style id='OddVU'><dir id='OddVU'><q id='OddVU'></q></dir></style></legend>

          <tfoot id='OddVU'></tfoot>
          • <bdo id='OddVU'></bdo><ul id='OddVU'></ul>
              <i id='OddVU'><tr id='OddVU'><dt id='OddVU'><q id='OddVU'><span id='OddVU'><b id='OddVU'><form id='OddVU'><ins id='OddVU'></ins><ul id='OddVU'></ul><sub id='OddVU'></sub></form><legend id='OddVU'></legend><bdo id='OddVU'><pre id='OddVU'><center id='OddVU'></center></pre></bdo></b><th id='OddVU'></th></span></q></dt></tr></i><div id='OddVU'><tfoot id='OddVU'></tfoot><dl id='OddVU'><fieldset id='OddVU'></fieldset></dl></div>

                  <tbody id='OddVU'></tbody>

                <small id='OddVU'></small><noframes id='OddVU'>

                  本文介绍了如何仅禁用一个组件的主体样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我只想为一个组件禁用 overflow-y: hidden 样式.这种风格在我的 style.scss 中是这样的

                  I want to disable overflow-y: hidden style for only one component. This style is in my style.scss like so

                  body {
                  overflow-y: hidden;
                  }
                  

                  我在我的组件中尝试过,但没有成功.

                  I tried this in my component but it did not work.

                  <div class="div1" style="overflow-y: visible !important;">
                  ...
                  </div>
                  

                  推荐答案

                  能不能试一下

                  .visibleClass{overflow-y: visible ;}
                  

                  到body css属性下的style.css

                  to style.css under body css attribute

                  在 appcomponent.html 中添加激活事件到 router-outlet

                  in appcomponent.html add activate event to router-outlet

                  <router-outlet (activate)="showHideNav($event)"></router-outlet>
                  

                  然后在component.ts中

                  then in component.ts

                   showHideNav(event){
                      event instanceof YourComponent ? document.body.classList.add("visibleClass") :
                                                       document.body.classList.remove("visibleClass")
                    } 
                  

                  这篇关于如何仅禁用一个组件的主体样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Embed YouTube video - Refused to display in a frame because it set #39;X-Frame-Options#39; to #39;SAMEORIGIN#39;(嵌入 YouTube 视频 - 拒绝显示在框架中,因为它将“X-Frame-Options设置为“SAMEORIGIN)
                  Stop embedded youtube iframe?(停止嵌入 youtube iframe?)
                  YouTube iframe API: how do I control an iframe player that#39;s already in the HTML?(YouTube iframe API:如何控制 HTML 中已有的 iframe 播放器?)
                  alternative of switch in typescript(打字稿中开关的替代品)
                  Switch/toggle div (jQuery)(切换/切换 div (jQuery))
                  Apply jquery (mobile) css classes programatically after rendering has occurred(呈现后以编程方式应用 jquery (mobile) css 类)

                  <legend id='gjlNY'><style id='gjlNY'><dir id='gjlNY'><q id='gjlNY'></q></dir></style></legend>

                    <i id='gjlNY'><tr id='gjlNY'><dt id='gjlNY'><q id='gjlNY'><span id='gjlNY'><b id='gjlNY'><form id='gjlNY'><ins id='gjlNY'></ins><ul id='gjlNY'></ul><sub id='gjlNY'></sub></form><legend id='gjlNY'></legend><bdo id='gjlNY'><pre id='gjlNY'><center id='gjlNY'></center></pre></bdo></b><th id='gjlNY'></th></span></q></dt></tr></i><div id='gjlNY'><tfoot id='gjlNY'></tfoot><dl id='gjlNY'><fieldset id='gjlNY'></fieldset></dl></div>
                        <tbody id='gjlNY'></tbody>

                        <bdo id='gjlNY'></bdo><ul id='gjlNY'></ul>
                      • <small id='gjlNY'></small><noframes id='gjlNY'>

                            <tfoot id='gjlNY'></tfoot>