<tfoot id='BK0zh'></tfoot>
      • <bdo id='BK0zh'></bdo><ul id='BK0zh'></ul>

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

        <i id='BK0zh'><tr id='BK0zh'><dt id='BK0zh'><q id='BK0zh'><span id='BK0zh'><b id='BK0zh'><form id='BK0zh'><ins id='BK0zh'></ins><ul id='BK0zh'></ul><sub id='BK0zh'></sub></form><legend id='BK0zh'></legend><bdo id='BK0zh'><pre id='BK0zh'><center id='BK0zh'></center></pre></bdo></b><th id='BK0zh'></th></span></q></dt></tr></i><div id='BK0zh'><tfoot id='BK0zh'></tfoot><dl id='BK0zh'><fieldset id='BK0zh'></fieldset></dl></div>
      1. <legend id='BK0zh'><style id='BK0zh'><dir id='BK0zh'><q id='BK0zh'></q></dir></style></legend>

        传单重叠形状不透明度

        时间:2023-08-08

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

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

            <tbody id='TKepD'></tbody>
          • <tfoot id='TKepD'></tfoot>
              • <bdo id='TKepD'></bdo><ul id='TKepD'></ul>
                <legend id='TKepD'><style id='TKepD'><dir id='TKepD'><q id='TKepD'></q></dir></style></legend>

                  本文介绍了传单重叠形状不透明度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  下面是带有圆圈的传单 (http://leafletjs.com/) 地图的屏幕截图.

                  Below is a screenshot of a leaflet (http://leafletjs.com/) map with circles in them.

                  圆圈的不透明度为 0.5,您可以清楚地看到它们重叠的位置.是否可以添加样式规则以使重叠不具有更高的不透明度?传单似乎不支持这一点,但我想知道 css 是否可以做到这一点?

                  The opacity of the circle is 0.5 and you can clearly see where they overlap. Is it possible to add a style rule such that the overlap doesn't have a higher opacity? It doesn't seem like leaflet has support for this but I wonder if such a thing is possible with css maybe?

                  我希望能够显示红色圆圈的上方(即显示其下方的内容)并具有同质的颜色.将不透明度分配给一个是不可行的.

                  I like to be able to show what the red circle is over (ie, show what is beneath it) and have a homogenous colour. Assigning the opacity to one is not feasible.

                  推荐答案

                  AFAIK 在 CSS 中没有办法防止半透明形状的重叠区域相互添加"颜色,无论好坏是预期的行为(现实生活中这种形状也会发生这种情况).

                  AFAIK there is no way in CSS to prevent the overlapping areas of semi-transparent shapes from having their colours "added" to each other, for better or worse this is expected behavior (it's what would happen with such shapes in real life too).

                  不幸的是,这对您没有太大帮助,但是有一种可能的解决方法.如果您可以将这些形状放入一个公共父元素中,则可以将 opacity:0.5; 应用于该元素.

                  Unfortunately that doesn't help you very much, however there is a possible work-around. If you can put these shapes into a common parent element you can apply opacity:0.5; to that instead.

                  简单的例子:

                  <div class="wrapper" style="opacity:0.5">
                    <div class="circle"></div><!-- opacity:1 -->
                    <div class="circle"></div><!-- opacity:1 -->
                    <div class="circle"></div><!-- opacity:1 -->
                  </div>
                  

                  这将使 .wrapper 及其所有子项的 opacity0.5.然后圆圈可以只是纯色,这意味着它们显示为均匀的半透明区域.

                  That will make .wrapper and all of it's children have an opacity of 0.5. The circles can then just be a solid colour, which will mean they display as a homogeneous semi-transparent zone.

                  我自己没有使用过leaflet.js,所以我不确定在你的情况下这是否是一个可行的解决方案,但这是我会尝试的.

                  I have not used leaflet.js myself, so I don't know for certain if this is a workable solution in your situation, but it's what I would try.

                  这篇关于传单重叠形状不透明度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:Chrome 和 Firefox 中的 SVG 文本对齐不一致 下一篇:OpenStreetMap 经常发送网关超时错误

                  相关文章

                  最新文章

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

                    <tfoot id='XDIhl'></tfoot>

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