我有一个带链接的图像库.
编辑:这是我必须使用的代码:
<div class="gallerypagetabs"><a href="http://costumingdiary.blogspot.com/2013/01/victorian-tardis-purse.html"><img alt="Free Victorian Purse Pattern" src="https://lh3.googleusercontent.com/-m4y6eS2KGRQ/Ug7TKD3sbYI/AAAAAAAAHNc/6qoeuGedjOY/s200-c/free-victorian-purse-pattern-1.jpg"><br>Free Victorian Purse Pattern</a><a href="http://costumingdiary.blogspot.com/2012/12/natural-form-victorian-overskirt.html"><img alt="Natural Form Victorian Overskirt" src="https://lh3.googleusercontent.com/-ZrTDaXEOiiU/US__mPzz3dI/AAAAAAAADWQ/eBm3tO3P8oI/s200-c/IMG_5482%255B6%255D.jpg"><br>Natural Form Victorian Overskirt</a><a href="http://costumingdiary.blogspot.com/2012/11/truly-victorian-tv221-1878-tie-back.html"><img alt="Truly Victorian TV221 1878 Underskirt Pattern Review" src="https://lh4.googleusercontent.com/-GmrRTxJ5NGY/UKfO_SQzymI/AAAAAAAAAHA/A9qx6czpyJk/s200-c/Truly-Victorian-TV221-1878-Tie-Back-%255B1%255D%255B4%255D.png"><br>Truly Victorian TV221 1878 Underskirt Pattern Review</a><a href="http://costumingdiary.blogspot.com/2012/10/truly-victorian-tv121-petticoat-pattern.html"><img alt="Truly Victorian TV121 Petticoat Pattern Review" src="http://lh4.ggpht.com/-qTsclIxCTKY/UH7fK3jqKII/AAAAAAAAodI/2GaQOVrGuuA/s200-c/Truly%252520Victorian%252520TV121%2525201879%252520Petticoat%252520with%252520Detachable%252520Train%25255B6%25255D.png?imgmax=800"><br>Truly Victorian TV121 Petticoat Pattern Review</a>..ad naseum..</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
.gallerypagetabs a,.gallerypagetabs p{
float:left;
font-size:.80em;
height:250px;
padding:10px;
text-align: center;
width:200px
}
Run Code Online (Sandbox Code Playgroud)
我想做的是当有人在图像上盘旋时,显示带有星星的透明图像.因此,如果一个人在自由维多利亚钱包图案图像上盘旋,他们会看到一个图像 - 比方说 - 五颗星表示该图案已经获得了我中5星中的5星评级.
我试过以下两个都没有运气.代码显示悬停时的图像,但它显示在图像的底部而不是重叠它:
.gallerypagetabs a:hover{
background-image:url('http://i.imgur.com/IKAXZKz.png');
background-position:inherit
}
Run Code Online (Sandbox Code Playgroud)
和
.gallerypagetabs a:hover{
background-image:url('http://i.imgur.com/IKAXZKz.png'); …Run Code Online (Sandbox Code Playgroud) WCAG 2.0建议还使用:focus何时:hover在链接元素上使用以支持键盘导航.这适用于链接元素,但两者之间存在一些差异.
:hover状态,而只有极少数可以聚焦这个问题严格关于css.有没有办法模拟:hover键盘导航的行为(如上所述)?或者有什么强烈的理由让人不想要那个?
为了使它更清楚这里是一个例子:
HTML:
<div id="box">
foo bar
<a href="#">click me</a>
</div>
Run Code Online (Sandbox Code Playgroud)
CSS:
#box {
opacity: 0.3;
}
#box:hover {
opacity: 1;
}
#box a:focus {
opacity: 1;
}
Run Code Online (Sandbox Code Playgroud)
使用鼠标时,我会在使用之前将鼠标悬停在link元素上.由于:hover向上传播的状态#box将完全不透明.
使用键盘时,我会在使用前关注链接元素.由于:focus国家并没有向上传播#box将不会是完全不透明.
我正在使用jquery颜色来生成一些随机颜色.我喜欢这些颜色,当用户将鼠标悬停在任何单选按钮标签上时.
按照这个网站上的例子,我想我可能会尝试:
spectrum();
function spectrum(){
var hue = ('lots of stuff here that generates random hue -- code on example webpage')
$('label').hover(function() {
$(this).animate( { color: hue }, 10000) });
spectrum();
}
Run Code Online (Sandbox Code Playgroud)
我的悬停选择器不起作用,一切都保持默认颜色.我显然是以某种方式搞砸了这个,但我没有足够的经验来理解出了什么问题.有什么建议?
开hoverIn- 我想要附加一个方框,将其向上滑动.
在hoverOut-框应该滑下去,然后取出盒
在一个简单的列表上它完美地工作,我可以将鼠标悬停在滑动元素上.但是如果我正在使用图像,当我尝试将鼠标悬停在滑动元素上时会产生闪烁效果.
将鼠标悬停在元素上,然后尝试将光标鼠标悬停在出现的红色框上.这有什么区别,我错过了什么吗?
对于相关对象和类似情况,我还需要使用stopPropagation吗?无法理解它.
这可能是一件非常简单的事情,但我对CSS完全不熟悉.我只是希望能够在gridview中对我的行进行鼠标悬停悬停效果,如果它正在悬停,则更改行的颜色.我很好奇我的CSS文件是否在正确的位置?我的Gridview.CSS应该与gridview.aspx位于同一文件夹中(我假设如此?).
这是我的CSS文件:
.Gridview tr.normal
{
background-color:white;
}
.Gridview tr.highlight
{
background-color:yellow;
}
Run Code Online (Sandbox Code Playgroud)
以下是我尝试实现它的方法:在.aspx文件中:
<asp:GridView ID="MsgInbox" runat="server" ....OnRowCreated="Gridview_RowCreated" CssClass = "Gridview">
Run Code Online (Sandbox Code Playgroud)
而在C#代码背后:
protected void Gridview_RowCreated(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.CssClass = "highlight";
}
}
Run Code Online (Sandbox Code Playgroud)
我知道我必须在C#中遗漏一些非常简单的东西.任何帮助,将不胜感激!谢谢!
我正在使用html5的拖放功能来重新排列屏幕上的dom元素 - 当我这样做时,我将css行为附加到拖放的各种状态,但我遇到的问题是悬停状态甚至在我之后仍然存在从DOM元素中拖出,删除和挖出.这是我的代码:
JAVASCRIPT:
function addDragListeners(){
$('.segmentListItem').each(function(index){
$(this)[0].addEventListener('dragstart',handleDragStart,false); //rollover for current
$(this)[0].addEventListener('drop',handleDrop,false); //drops dragged element
$(this)[0].addEventListener('dragover',handleDragOver,false); //allows us to drop
$(this)[0].addEventListener('dragenter',handleDragEnter,false); //rollover for target
$(this)[0].addEventListener('dragleave',handleDragLeave,false); //sets dragged item back to normal
$(this)[0].addEventListener('dragend',handleDragEnd,false); //sets all back to normal
});
}
function handleDragEnter(e) {
// this / e.target is the current hover target.
this.classList.add('over');
}
function handleDragLeave(e) {
this.classList.remove('over'); // this / e.target is previous target element.
}
function handleDragEnd(e){
$('.segmentListItem').removeClass('over'); //removes the over class on all elements
}
function handleDragStart(e){
draggedItem …Run Code Online (Sandbox Code Playgroud) 我在class .one(.one :hover)上放置了一个"悬停"功能,将其更改background-color为灰色.每当我将鼠标悬停在容器div上时,我都希望它能突出显示两个divs(.two, .three).one.
但是,它的作用是单独悬停在两个嵌套的divs(.two,.three)上.有人可以解释为什么这是如此以及我必须做些什么来突出整个div .one创建一个单一的实心灰色div?
下面是我使用的CSS.
.one {
width: 200px;
display: inline-block;
}
.two {
background-color: rgba(0, 51, 102, 1);
width: 50px;
height: 100px;
float: left;
}
.three {
background-color: rgba(0, 204, 204, 1);
width: 150px;
height: 100px;
float: right;
}
.one :hover {
background-color: rgba(153, 153, 153, 1);
}Run Code Online (Sandbox Code Playgroud)
<div class="one">
<div class="two">
</div>
<div class="three">
</div>
</div>Run Code Online (Sandbox Code Playgroud)
我有悬停和悬停时高度增长的div我希望它们与所有其他div重叠,而不是像我的例子那样推动它们.
#container{
width: 300px;
}
#container a div{
float:left;
width: 100px;
height: 60px;
-webkit-transition: all 0.25s ease;
}
#container .color1{
background: #444;
}
#container .color2{
background: #555;
}
#container .color3{
background: #666;
}
#container .color4{
background: #777;
}
#container .color5{
background: #888;
}
#container a div:hover{
height: 80px;
-webkit-transition: all 0.25s ease;
}
Run Code Online (Sandbox Code Playgroud)
我想强调鼠标悬停在我的行上QTableWidget.
当我悬停鼠标时,只突出显示单个单元格.
我试过这种方法:
bool MyTabWidget::eventFilter(QObject *target, QEvent *event)
{
if( target == ui->MyTableWidget )
{
//Just to print the event type
qDebug() <<"EventType : "<<event->type();
}
}
Run Code Online (Sandbox Code Playgroud)
输出: EventType : 13.
`(13 = QEvent::Move)`
Run Code Online (Sandbox Code Playgroud)
我已经迷失了谷歌搜索.但没有得到任何适当的解决方案
有没有其他方法来满足我的要求(突出显示鼠标悬停的整行)?
请帮忙.预先感谢.
编辑:
请参考下面的屏幕截图更清晰.

这是我QTableWidget
想要在鼠标悬停时更改红色边框(已编辑)行的背景颜色.
我正在为Bokeh编写一个圆形图,使用内置的悬停工具显示工具提示.我正在使用大量在某些位置重叠的点,通常会导致一次出现多个工具提示.
hover = HoverTool(
tooltips="""
<div>
<div>
<span style="font-size: 10px;">@names</span><br />
<span style="font-size: 10px;">@dates</span><br />
<span style="font-size: 10px; color: #696;">@x, @y</span>
</div>
</div>
""",
point_policy='snap_to_data'
)
TOOLS = ["resize, crosshair, pan, wheel_zoom, box_zoom, reset", hover]
# Initialize the graph
p = figure(tools=TOOLS, webgl=True, x_range=(-bound, bound), y_range=(0, bound), lod_timeout=1000, lod_factor = 10, lod_interval = 300, lod_threshold=10)
Run Code Online (Sandbox Code Playgroud)
一次显示太多工具提示会减慢应用程序的速度并在屏幕外运行.是否可以限制渲染的工具提示数量.