<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. TypeError: Fetch argument 0.484375 has invalid type <class 'numpy.float32'>, must be a string or Tensor. (Can not convert a float32 into a Tensor or Operation.)

    报错: TypeError: Fetch argument 0.484375 has invalid type <class 'numpy.float32'>, must be a str ...

  2. Leetcode: Number Complement

    Given a positive integer, output its complement number. The complement strategy is to flip the bits ...

  3. Qt QDateEdit QDateTimeEdit

    展示一个效果,然后附上一个“笑话~~”...回想起来都是搞笑的. 笑话来了,,,,几个月前,为了做出时间选择界面,我亲自“创造”了一个...今天发现了QDateEdit的属性CalendarPopup ...

  4. JavaScript实现循环链表

    单链表地址:点我 一.循环链表 节点的next指向下一个节点,节点的prev指向上一个节点 function loopList() { let length = 0, head = null, tai ...

  5. python中pip升级

    第一步: 首先安装python,在百度中搜索python,进入python官网,点击downliad, 下载到本地: 下载好后进行安装,与一般软件安装过程一样.安装过程中要注意勾线Add python ...

  6. (.NET高级课程笔记)泛型总结

    泛型总结 1.引入泛型:延迟声明,即在声明的时候没有指定参数类型,只有当调用的时候才会确定 其参数类型(架构师的理念:推迟一切可以推迟的) 2.如何声明和使用泛型 3.泛型的好处和原理 4.泛型类.泛 ...

  7. springboot引入AOP

    AOP是Aspect Oriented Programming的缩写,意为面向切面编程.通过预编译方式和运行期动态代理实现程序功能的统一维护的一种技术.AOP是spring框架的一个重要内容,她通过对 ...

  8. 18.12.02-C语言练习:韩信点兵

    C语言练习:韩信点兵 题目说明:本题是中国经典问题,有多种解法,从数论课程角度看,是一个不定方程组,而且答案不唯一. 但这里采用程序解法,使用的是暴力破解.枚举可能的解,然后根据条件判断,满足所有条件 ...

  9. RNA-seq workflow

    SRAtoolkit download .fa http://www.genomicdataanalysis.com/genomicdatatype/rna-seq/

  10. liunx驱动----按键中断

    liunx 中断 先设置异常入口 异常向量 void __init trap_init(void) 构造了异常向量 vector_irq+offset       按下按键: cpu自动进入异常模式 ...