Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/xy-tips #14

Open
XboxYan opened this issue Jul 9, 2019 · 2 comments
Open

/xy-tips #14

XboxYan opened this issue Jul 9, 2019 · 2 comments

Comments

@XboxYan
Copy link
Owner

XboxYan commented Jul 9, 2019

https://xy-ui.codelabo.cn/docs/#/xy-tips

Description

@shouhe
Copy link

shouhe commented Jul 10, 2019

666

@XboxYan
Copy link
Owner Author

XboxYan commented Aug 19, 2019

是用css实现的话,有个非常大的缺陷就是会被外层某个未知位置的overflow:hidden遮住,调试起来非常困难。不知道用js实现难不难,还是说css还有可以突破的地方?

js实现也不复杂,主要有一个滚动问题,js一般会生成在body上,然后相对于body定位,如果页面内有局部滚动,那么定位就会出问题
css实现可能有一些局限性(比如overflow问题,不过使用者可以避免),但总体而言还是最优的实现方法。

其实这一整套组件很多地方都是css优先实现,实在不行才会考虑js,适用性更好。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants