<i
className={classNames({
'device-icon': true,
'camera-icon': true,
'camera-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: this.state.isCameraOpened === true,
})}
role="button"
tabIndex={0}
onClick={this.handleClickCamera}
labeltooltip="摄像头"
/>
<i
className={classNames({
'device-icon': true,
'mic-icon': true,
'mic-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: this.state.shouldVolumeGainBarShow === true,
})}
role="button"
tabIndex={0}
onClick={this.handleClickMic}
labeltooltip="麦克风"
/>
<i
className={classNames({
'device-icon': true,
'wifi-icon': true,
'wifi-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: false,
})}
role="button"
tabIndex={0}
onClick={() => {}}
labeltooltip="网络"
/>
<i
className={classNames({
'device-icon': true,
'exit-icon': true,
'exit-icon-hover-show-intro': this.state.shouldVolumeGainBarShow === false,
active: this.state.selectedIconName === SCREEN_SHARE_ICONTABNAME.EXIT,
})}
role="button"
tabIndex={0}
onClick={() => this.handleClickExit(SCREEN_SHARE_ICONTABNAME.EXIT)}
labeltooltip="退出桌面共享"
/>
.device-icon {
width: 24px;
height: 24px;
outline: none;
cursor: pointer;
margin-right: 11px;
position: relative; &:nth-last-child(2) {
margin-right: 24px;
}
} .camera-icon {
background: url('~ROOT/shared/assets/image/vn-screen-camera-off-66-66.png') no-repeat center;
background-size: 22px 22px; &.camera-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 58px;
left: -20px;
}
} &.active {
background: url('~ROOT/shared/assets/image/vn-camera-hover-69-66.png') no-repeat center;
background-size: 23px 22px;
}
} .mic-icon {
background: url('~ROOT/shared/assets/image/vn-screen-voice-on-54-72.png') no-repeat center;
background-size: 18px 24px; &.mic-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 58px;
left: -20px;
}
} &.active {
background: url('~ROOT/shared/assets/image/vn-mic-hover-54-72.png') no-repeat center;
background-size: 18px 24px;
}
} .speaker-icon {
background: url('~ROOT/shared/assets/image/vn-screen-speaker-60-66.png') no-repeat center;
background-size: 20px 22px;
} .wifi-icon {
background: url('~ROOT/shared/assets/image/vn-screen-wifi-72-57.png') no-repeat center;
background-size: 24px 19px; &.wifi-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 58px;
left: -20px;
}
} &.active {
background: url('~ROOT/shared/assets/image/vn-wifi-72-72.png') no-repeat center;
background-size: 24px 24px;
}
} .restart-icon {
background: url('~ROOT/shared/assets/image/vn-screen-restart-60-60.png') no-repeat center;
background-size: 19px 19px;
} .exit-icon {
background: url('~ROOT/shared/assets/image/vn-screen-exit-60-60.png') no-repeat center;
background-size: 19px 19px; &.exit-icon-hover-show-intro {
&:hover:after {
box-sizing: border-box;
height: 24px;
line-height: 24px;
position: absolute;
bottom: -26px;
border-radius: 12px;
background-color: #ffffff;
font-size: 12px;
color: #626e80;
font-style: normal;
cursor: default;
text-align: center;
content: attr(labeltooltip);
width: 95px;
left: -35px;
}
} &.active{
background: url('~ROOT/shared/assets/image/screen-exit-blue-60-60.png') no-repeat center;
background-size: 19px 19px;
}
}

react项目中实现悬浮(hover)在按钮上时在旁边显示提示的更多相关文章

  1. WPF中当鼠标移到按钮上时,按钮的背景图片消失的问题

    如果给按钮设置了背景图片,当鼠标移到按钮上的时候,按钮就好变成一个浅蓝色的按钮,背景图片就消失了,对于这个问题有很多解决方法,我只分享一下我的解决方法. 我第一次用的方式是在按钮中添加一个图片,不用背 ...

  2. iOS 让按钮上的标题换行显示

    项目中遇到了要让按钮上的文字换行显示的需求,就写了这个博客. 1.如果按钮上的文字固定,形式是写死的,可以考虑给标题文字加\n换行符来达到效果,但是,记得一定要设置这个属性,不然是不会换行的, but ...

  3. React项目中实现右键自定义菜单

    最近在react项目中需要实现一个,右键自定义菜单功能.找了找发现纯react项目里没有什么工具可以实现这样的功能,所以在网上搜了搜相关资料.下面我会附上完整的组件代码. (注:以下代码非本人原创,具 ...

  4. 如何在非 React 项目中使用 Redux

    本文作者:胡子大哈 原文链接:https://scriptoj.com/topic/178/如何在非-react-项目中使用-redux 转载请注明出处,保留原文链接和作者信息. 目录 1.前言 2. ...

  5. 如何优雅地在React项目中使用Redux

    前言 或许你当前的项目还没有到应用Redux的程度,但提前了解一下也没有坏处,本文不会安利大家使用Redux 概念 首先我们会用到哪些框架和工具呢? React UI框架 Redux 状态管理工具,与 ...

  6. react项目中实现元素的拖动和缩放实例

    在react项目中实现此功能可借助 react-rnd 库,文档地址:https://github.com/bokuweb/react-rnd#Screenshot .下面是实例运用: import ...

  7. React项目中使用Mobx状态管理(二)

    并上一节使用的是普通的数据状态管理,不过官方推荐使用装饰器模式,而在默认的react项目中是不支持装饰器的,需要手动启用. 官方参考 一.添加配置 官方提供了四种方法, 方法一.使用TypeScrip ...

  8. 在react项目中使用ECharts

    这里我们要在自己搭建的react项目中使用ECharts,我们可以在ECharts官网上看到有一种方式是在 webpack 中使用 ECharts,我们需要的就是这种方法. 我们在使用ECharts之 ...

  9. 优雅的在React项目中使用Redux

    概念 首先我们会用到哪些框架和工具呢? React UI框架 Redux 状态管理工具,与React没有任何关系,其他UI框架也可以使用Redux react-redux React插件,作用:方便在 ...

随机推荐

  1. 基于Spark自动扩展scikit-learn (spark-sklearn)(转载)

    转载自:https://blog.csdn.net/sunbow0/article/details/50848719 1.基于Spark自动扩展scikit-learn(spark-sklearn)1 ...

  2. 真正可用的安卓webview html图片上传限制突破处理(拍照+相册都可以用)

    两篇起步使用webview参考文章,第一篇解除限制,但会调用外部浏览器打开链接,第二篇 覆盖shouldOverrideUrlLoading return true https://www.jb51. ...

  3. Linux下Netty实现高性能UDP服务(SO_REUSEPORT)

    参考: https://www.jianshu.com/p/61df929aa98b SO_REUSEPORT学习笔记:http://www.blogjava.net/yongboy/archive/ ...

  4. selenium--键盘事件

    from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Fi ...

  5. 从零开始一起学习SLAM | 点云到网格的进化

    点击公众号"计算机视觉life"关注,置顶星标更快接收消息! 本文编程练习框架及数据获取方法见文末获取方式 菜单栏点击"知识星球"查看「从零开始学习SLAM」一 ...

  6. Android Glide 加载图片

    0.借鉴文章地址:http://blog.csdn.net/zivensonice/article/details/51835802 和 http://www.cnblogs.com/zhaoyanj ...

  7. C#中的反射 Reflection

    起初是因为这个4.0才新增的新的引用类型,我当时很惊讶为什么string和int他都能装,然后我就发在了群里,以为大佬告诉我他的内部实现是通过反射来实现的,于是我就去看反射了,看了网上的好多篇文章大篇 ...

  8. URLs ...

    各浏览器对ES6的支持 https://blog.csdn.net/lpw_cn/article/details/84789183 http://kangax.github.io/compat-tab ...

  9. linux windows 格式化一块大于2 TiB硬盘

    转自:https://help.aliyun.com/document_detail/34377.html?spm=a2c4g.11186623.2.10.17447386JrLBNR#concept ...

  10. iOS进阶之正则表达式

    最近一直在弄正则表达式,于是在这里整理一下,便于日后查阅. 1.常用符号 ^:字符串的开始 $:字符串的结束 *:表示零个或若干个 ?:表示零个或一个 +:表示一个或若干个 | :表示 或 操作 . ...