• <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. 如何仅禁用一个组件的主体样式

        时间:2023-09-07

          <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")
                    } 
                  

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

                  上一篇:将 base64 编码的图像用于 Web 是否安全,优点和缺点? 下一篇:如何处理角度5递归未知确切数字路由器参数?

                  相关文章

                  <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>

                        <bdo id='gjlNY'></bdo><ul id='gjlNY'></ul>
                    1. <small id='gjlNY'></small><noframes id='gjlNY'>

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