html – 更改:之前:将鼠标悬停在主DIV上?

我有一个看起来像讲话泡泡的div.主要的div是泡沫和:之前是箭头.我想要做的是,当你翻转时:将DIV悬停在CSS中,它也会改变:之前.

这是我的代码

.sidebar_image_Box_newsFeed_user_info_comments { color: #ffffff; background-color: #2f2f2e; text-decoration: none; -webkit-transition-property: background-color,color,text-decoration; -webkit-transition-duration: 0.5s,0.5s,0.5s; }

.sidebar_image_Box_newsFeed_user_info_comments:hover { background-color: #3b3b3b; color: #f3f3f3; text-decoration: underline; }

.sidebar_image_Box_newsFeed_user_info_comments:before { content:""; position:absolute; bottom:-6px; right:0; border-width:0 0 6px 6px;  border-style:solid; border-color:transparent #2f2f2e;  text-decoration: none; -webkit-transition-property: background-color,0.5s; }

解决方法

.sidebar_image_Box_newsFeed_user_info_comments:hover:before {
   content: "I am new";
}

jsFiddle.

相关文章

vue阻止冒泡事件 阻止点击事件的执行 <div @click=&a...
尝试过使用网友说的API接口获取 找到的都是失效了 暂时就使用...
后台我拿的数据是这样的格式: [ {id:1 , parentId: 0, name:...
JAVA下载文件防重复点击,防止多次下载请求,Cookie方式快速简...
Mip是什么意思以及作用有哪些