鼠标悬停时获取产品详细信息
我想将一项功能集成到我的网站中,如果用户将鼠标悬停在产品名称上,则会出现一个框,其中显示该产品的详细信息。为此,我更愿意使用 CSS 或 Javascript,但我不太确定如何去做。有人可以给我一些指导吗?我目前使用的 JQuery UI 的代码与此处看到的购物车代码基本相同:
http: //jqueryui.com/demos/droppable/#shopping-cart
非常感谢您的帮助。
I want to integrate a function into my website, whereby if a user hovers their mouse on the name of a product, a box appears which will show the details of this product. For this I would preferably like to use either CSS or Javascript, I am not really sure how I would go about doing this though. Can anyone offer me some guidance please? I am currently using the JQuery UI with essentially the same code as the shopping cart code seen here :
http://jqueryui.com/demos/droppable/#shopping-cart
Thnk you very much for the help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您想使用 jquery,这里有一个弹出插件列表,您可以使用可以浏览。
如果产品信息不是太复杂,我建议使用CSS,因为它更简单。此外,您可能希望数据已经加载,这样用户就不必每次将鼠标悬停在产品上时都等待往返您的服务器。 这里是一个简单的CSS弹出教程。
If you want to be fancy and use jquery, here is a list of popup plugins that you can browse.
If the product information isn't too complicated I would suggest using CSS as it is simpler. Also, you probably want to have the data already loaded, so the user doesn't have to wait a round trip to your server every time they mouse over a product. Here is a simple CSS popup tutorial.