是否可以在背景中制作带箭头和渐变的圆圈?

Jit*_*yas 2 html css css3

我需要在里面做一个带箭头和渐变的圆圈.我知道我可以用它作为图像.但它需要灵活调整屏幕大小,以便背景渐变动态变化.我很好奇是否可以使用单个<span>标签和CSS 来做到这一点.

在此输入图像描述

在此输入图像描述

Rok*_*jan 7

编辑:
按钮css3
下面是一个使用两个div来使用rotation和border-radius模拟箭头的示例:

DEMO

  .btn{
    cursor:pointer;
    position:relative;
    font-family:'Trebuchet MS', Verdana, Arial, sans-serif;
    display:inline-block;
    padding:3px 0 3px 16px;
    text-align:center;
    height:22px;
    color:#696969;/*#DB7DB4;*/
    text-shadow:0px 1px 1px #fff;
    -webkit-border-radius: 22px;
    -moz-border-radius: 22px;
    border-radius: 22px;
    border:1px solid rgba(220,87,166,0.8);
    box-shadow: 0px 0px 0px 3px rgba(220,87,166, 0.8);

    background: #fafafa; /* Old browsers */
    background: -moz-linear-gradient(top,  #fafafa 0%, #939393 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#fafafa), color-stop(100%,#939393)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #fafafa 0%,#939393 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #fafafa 0%,#939393 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #fafafa 0%,#939393 100%); /* IE10+ */
    background: linear-gradient(top,  #fafafa 0%,#939393 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fafafa', endColorstr='#939393',GradientType=0 ); /* IE6-9 */  
  }

  .btn_circle{
    position:relative;
    float:right;
    margin:0px 3px 0 8px;
    display:table;
    width:20px;
    height:21px;
    border:1px solid rgba(255,255,255,0.6);
    border-radius:21px;
    box-shadow: inset 0px 3px 2px rgb(92, 38, 70);
    background: #6b294f; /* Old browsers */
    background: -moz-linear-gradient(top, #6b294f 0%, #BE609E 99%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6b294f), color-stop(99%,#BE609E)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #6b294f 0%,#aa6592 99%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #6b294f 0%,#BE609E 99%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #6b294f 0%,#BE609E 99%); /* IE10+ */
    background: linear-gradient(top, #6b294f 0%,#BE609E 99%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6b294f', endColorstr='#aa6592',GradientType=0 ); /* IE6-9 */
  }

  .btn_arr{
    position:absolute;
    right:8px;
    height:3px;
    width:10px;
    background:#d9d9d9;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    border-radius: 3px;
    box-shadow:-1px 0px 1px #6F375D;
  }
  .btn_top{
    top:11px;
    -webkit-transform: rotate(45deg);
    -moz-transform: rotate(45deg);
    transform: rotate(45deg);
  }
  .btn_bot{
    top:16px;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    transform: rotate(-45deg);
  }
Run Code Online (Sandbox Code Playgroud)

老帖子:

按钮图像 以下是唯一可能的(AFAIK)css箭头示例:

演示1

DEMO 2(带'>'字符)

HTML:

  <div class="circle">
     <div class="arrow"></div>
  </div>
Run Code Online (Sandbox Code Playgroud)

CSS:

.arrow{
    margin:0 auto;  
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #CFC5CD;
}
.circle{
    display:table;
    line-height:30px;
    width:10px;
    height:10px;
    padding:3px 5px 3px 7px;
    border:2px solid #CFC5CD;
    border-radius:21px;
   background: #6b294f; /* Old browsers */
background: -moz-linear-gradient(top, #6b294f 0%, #aa6592 99%); /* FF3.6+ */
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#6b294f), color-stop(99%,#aa6592)); /* Chrome,Safari4+ */
background: -webkit-linear-gradient(top, #6b294f 0%,#aa6592 99%); /* Chrome10+,Safari5.1+ */
background: -o-linear-gradient(top, #6b294f 0%,#aa6592 99%); /* Opera 11.10+ */
background: -ms-linear-gradient(top, #6b294f 0%,#aa6592 99%); /* IE10+ */
background: linear-gradient(top, #6b294f 0%,#aa6592 99%); /* W3C */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#6b294f', endColorstr='#aa6592',GradientType=0 ); /* IE6-9 */
  }
Run Code Online (Sandbox Code Playgroud)