Name

Results 14 comments of Name

@arrayoutofbounds Hello!Do you have a solution for this problem?Is it saved?I'm having the same problem now.Thank you very much!

@babachao 请问可以找到是哪里的问题吗?可以解决吗? https://codesandbox.io/s/unruffled-chebyshev-bkwcsf?file=/index.html

@babachao ![image](https://user-images.githubusercontent.com/75262115/189268722-ca8ba104-4a5e-4c6f-8e6a-d056857c89f4.png) 应该是这里获取节点宽高的函数获取方法不适合display:none时,父元素为display:none时, ` console.log($("#div1").width()) console.log($("#div1").height()) ` 这种可以获取到子元素的宽高,其他很多方式获取的结果是0,js原生的通过getElementById等,或者在这里通过elem.childNodes[0].width.animVal.value也可以获取到宽,可以解决这个问题,其实根源我应该继续跟踪到elem.getBBox()中去看的,但是由于我pull下来的代码没法运行,使用rollup打包总是报错,所以我只能在跟踪到这里,elem.getBBox()中或者可能根源更深,希望你们可以从根源处解决 ![image](https://user-images.githubusercontent.com/75262115/189294319-45b17317-e954-43b2-9d5c-f81c9e0ba22a.png) ![image](https://user-images.githubusercontent.com/75262115/189295537-5bf55fa6-d935-4e55-96b6-bb5a4fa48ce9.png) 这里打个补丁可以暂时解决这个问题,我没找到更好的方法去解决了,因为无法跟踪elem.getBBox()

![image](https://user-images.githubusercontent.com/75262115/189298260-637ab3a9-8cdf-4ca9-9022-76216de2700a.png)

> 阔以搞个demo么 https://codesandbox.io/s/unruffled-chebyshev-bkwcsf?file=/index.html @babachao 这个demo本身是显示错误的,将display:none注释掉,显示正常的情况; 期望是当display:none存在时,依旧可以显示正常 (刚进去可能不显示,点击一下刷新, ![image](https://user-images.githubusercontent.com/75262115/190535344-0dffd583-9743-4f63-8667-2150953c9af4.png) )

hello!请问是否有好的解决方法呢?麻烦告知一下,谢谢! @babachao @NewByVector

> 请问你是怎么加的呢,为什么我使用visibility属性还是有这个问题 @zhenghan2017