-1
    .button1{


      background: #E68A00 url(wooden.jpg) repeat-x;
      border: 2px solid #eee;
      height: 28px;
      width: 115px;
      margin: 50px 0 0 50px;
      padding: 0 0 0 7px;
      overflow: hidden;
      display: block;
      text-decoration:none;
      font-family: 'Sacramento', cursive;
      color : white;
      font-size: 30px;

      /*Rounded Corners*/
    -webkit-border-radius: 15px;
    -moz-border-radius: 15px;
    border-radius: 15px;

    /*Gradient*/
    background-image: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: -moz-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: -o-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: -ms-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));
    background-image: linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.2));

    /*Transition*/
    -webkit-transition: All 0.5s ease;
    -moz-transition: All 0.5s ease;
    -o-transition: All 0.5s ease;
    -ms-transition: All 0.5s ease;
    transition: All 0.5s ease;


    }

    #pg .button1{ 
    position: absolute
    left:340px;
    top:50px;

    }

    #p2 .button1{ 
    position:relative 
    left:340px;
    top:50px;

    }

    #p3 .button1{ 
    position:relative 
    left:40px;
    top:50px;

    }

    .button1:hover {
      width: 200px;
    }


 <a class="button1 pg " href="...">Small $14</a>
    <a class="button1 p2" href="...">Medium $15</a>
    <a class="button1 p2" href="...">Large $16</a>

我今天已经发布了这个问题两次以上!并且仍然没有有效的解决方案上面的代码有效,但是当我尝试更改 left 和 top 值时,什么也没有发生:(。基本上我想更改共享相同属性(设计)的 3 个按钮的位置。太烦人了,过去 3 个小时我一直在这里寻找解决此问题的方法。请帮助!

4

1 回答 1

0

您没有id属性,但您希望#ID 选择器能够工作?

要选择第一个按钮,您需要类似.button1.pg

于 2013-03-17T20:12:54.933 回答