简体   繁体   English

带信息的div圈,悬停时显示所有信息

[英]Circle div with information, on hover show all information

I want to have three circular divs next to each other (that's not a problem). 我想将三个圆形div彼此相邻(这不是问题)。 At the bottom of the circle it will show the first words of my information text. 在圆圈的底部,将显示我的信息文本的第一个单词。 On hover the information text will go up so you can read the whole text: 悬停时,信息文本将上升,因此您可以阅读全文:

http://i.imgur.com/zIbG27h.png

What I tried to do at first was to create a div width: 170px and height: 170px , set a circle as a background in my CSS and do class:hover to bring up the text. 我最初尝试做的是创建一个div width: 170pxheight: 170px ,在我的CSS中设置一个圆圈作为背景,并执行class:hover来显示文本。

What I realised while attempting this was that I can't hide some of the text "behind" the circle like in the Normal picture I posted above. 尝试执行此操作时,我意识到,我无法像上面上面发布的“ 普通图片”一样,将某些文本隐藏在圆圈“后面”。

Whats the best way to do this? 最好的方法是什么?

Make an img that floats on top of the text (using CSS absolute positioning) that has the inner part of the circle transparent. 使img浮动在文本的顶部(使用CSS绝对定位),使文本的内部透明。 See here for more information. 有关更多信息,请参见此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM