html - 双箭头 CSS

标签 html css css-shapes

我想在圆圈中创建一个双箭头,但我只能创建一个。 我以前尝试过使用但无能为力。 这是代码:

<div id="basso">
    <a href="#" id="freccia">
        <span id="bottom"></span>
    </a>
</div>

fiddle : fiddle

最佳答案

我只是使用了 :before 并复制了您在 :after 上使用的 CSS,仅更改了 margin-top 和位置。

    #basso
	{
	  text-align: center;
	  display: inline-block;
	  vertical-align: middle;
	}


	#bottom
	{
	  display: inline-block;
	  border-radius: 50%;	
	}

	#freccia:hover #bottom
	{
	  display: inline-block;
	  border-radius: 50%;
	  border: 0.15em solid #4183D7;
	}

	#freccia:hover #bottom:after
	{
	  border-top: 0.15em solid #4183D7;
	  border-right: 0.15em solid #4183D7;
	}



	#bottom 
	{
	  display: inline-block;
	  width: 3em;
	  height: 3em;
	  border: 0.15em solid #333;
	  border-radius: 50%;
	  margin-left: 0.75em;
	  transition: all 0.1s ease-out;
	  
	  
	}

	#bottom:after 
	{
	  content: '';
	  display: inline-block;
	  margin-top: 0.6em;
	  width: 1.2em;
	  height: 1.2em;
	  border-top: 0.15em solid #333;
	  border-right: 0.15em solid #333;
	  -moz-transform: rotate(135deg);
	  -webkit-transform: rotate(135deg);
	  transform: rotate(135deg);
	  transition: all 0.1s ease-out;
	}
		#bottom:before 
	{
		position: absolute;
	  content: '';
	  display: inline-block;
	  margin-top: 0.3em;
	  width: 1.2em;
	  height: 1.2em;
	  border-top: 0.15em solid #333;
	  border-right: 0.15em solid #333;
	  -moz-transform: rotate(135deg);
	  -webkit-transform: rotate(135deg);
	  transform: rotate(135deg);
	  transition: all 0.1s ease-out;
	}


	#bottom:hover:after
	{
	  content: '';
	  display: inline-block;
	  margin-top: 0.9em;
	  width: 1.2em;
	  height: 1.2em;
	  border-top: 0.15em solid #4183D7;
	  border-right: 0.15em solid #4183D7;
	  -moz-transform: rotate(135deg);
	  -webkit-transform: rotate(135deg);
	  transform: rotate(135deg);
	}
	
	#bottom:hover:before
	{
	  content: '';
	  display: inline-block;
	  margin-top: 0.6em;
	  width: 1.2em;
	  height: 1.2em;
	  border-top: 0.15em solid #4183D7;
	  border-right: 0.15em solid #4183D7;
	  -moz-transform: rotate(135deg);
	  -webkit-transform: rotate(135deg);
	  transform: rotate(135deg);
	}
    <div id="basso">
        <a href="#" id="freccia">
            <span id="bottom"></span>
        </a>
    </div>

关于html - 双箭头 CSS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46735851/

相关文章:

html - 交通灯的 CSS 形状

css - 在右侧 CSS 创建带有三 Angular 形的列表

html - div 边框 - 折叠到 0 高度

html - CSS 仅选择直接子项

css - 列表项菜单中的图像上的文字

html - 针对特定的 <div> CSS

仅 CSS 标记形状

javascript - JQuery 仅在特定宽度下工作

html - Bootstrap 3 在 Django 模板中显示 col-md-6 之外的内容

html - 使用 FireFox 的 CSS 计算中缺少 4px+