javascript - 带有圆形菜单的 float 操作按钮

标签 javascript jquery html css material-design

我想创建一个显示圆形菜单的 float 操作按钮 Something Like This image

是否可以使用纯 css 来实现

最佳答案

我选择了随机图标。如果您需要更改,请使用 font-awsome 中的图标。 页面并将类名替换为受尊重的图标

.main{
	color:#222;
  z-index:1000;
  position:absolute;
  width:45px;
  height:45px;
  bottom:50px;
  float:right;
  right:200px;
  display: table-cell;
  vertical-align: middle;
  background-color:#00affd;
  text-align: center;
  box-shadow:1px 2px 10px #555;
  border-radius:100%;
  color:#fff;
  transition: all 0.5s cubic-bezier(0.680, -0.550, 0.265, 1.550); 
  cursor:pointer;
}
.main{
line-height:45px !important;
}
.main:focus > .cir {
  opacity:1;
  width:100px;
  height:100px;
   transform-style: preserve-3d;
}
p{
opacity:0;
position: relative;
    float: right;
    left: -58px;
    /* width: 50px; */
    line-height: normal;
    top: -60px;
    padding: 2px 10px;
    height: 20px;
    border-radius: 3px;
    background: #9E9E9E;
      box-shadow:1px 2px 10px #555;
}
.main:hover > p{
opacity:1;
}
.cir{
  z-index:2;
  opacity:0;
  position:absolute;
 right:50%;
 bottom:50%;
  width:10px;
  height:10px;
border-radius:100%;
transition: all 0.5s cubic-bezier(0.680, -0.550, 0.265, 1.550); 
}
*{outline:none;}
<link href="http://fontawesome.io/assets/font-awesome/css/font-awesome.css" rel="stylesheet"/>
<div  class="main" tabindex="1">X
  <div class="cir">
  <a class="main fa fa-user-circle " style="left:80%;bottom:90%;"><p>contact</p></a>
  <a class="main fa fa-whatsapp" style="left:30%;bottom:55%;"><p>WhatsApp</p></a>
  <a class="main fa fa-twitter-square" style="left:5%;bottom:10%;"><p>Twitter</p></a>
  <a  class="main fa fa-google-plus"  style="left:-15%;bottom:-40%;"><p>Google</p></a>

  </div>
</div>

关于javascript - 带有圆形菜单的 float 操作按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42993016/

相关文章:

javascript - Div 没有显示在 JavaScript 中?

jquery - 将 'id'插入具有外键(HQL)的字段中

javascript - Ajax PHP 返回空文件

html强制div为父级高度的100%并将图像放在其中间

javascript - Jquery ajax facebox

javascript - 错误 : Jmeter: Typed variable declaration : Class or variable not found: org. openqa.selenium:在第 4 行

调用javascript函数的php代码返回函数未定义

javascript - 如何限制 Google Geocoding API 的地理编码请求只返回某个国家的城市和邮政编码

html - 没有不透明文本的不透明背景

html 换行一次或多次