不能在下拉中看到我的精灵

时间:2014-09-01 08:51:03

标签: html css css-sprites

大家好我正在尝试查看我的精灵而不是实际落下的箭头....我可以在我的index.html上看到我的精灵与它的某些元素以及当我将精灵设置到身体时我也看到了。

CSS

body {
  margin: 0;
  font-family: 'corbel', Arial;
  font-size: 1em;
  color: white;
  background: url(../images/paris3.jpg) no-repeat left top;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;
}

.logo figure {
  text-align: center;
}


/* Hero Section */
.hero-container {
  margin: 0 auto;
  text-align: center;
  padding-top: 100px;
}

h4 {
  text-align: center;
  font-size: 16px;
  font-family: corbel;
}
textarea {
  resize:none;
}

}
.scl-area{
  text-align:center;
  margin:0px auto;
  margin-top: 10px;
  margin-bottom: 15px;  
}
.scl-area ul{
  margin:0px;
  padding:0px;
  display:inline-block;

}
.scl-area li{
  list-style:none;
  display:inline-block;
  width:32px;
  height:32px;
  margin:0px 5px;
  margin-top:14px;
  transition:All 0.3336s ease-in-out;
  -webkit-transition:All 0.3336s ease-in-out;
  -moz-transition:All 0.3336s ease-in-out;
  -o-transition:All 0.3336s ease-in-out;  
}
.scl-area li a{
  width:32px;
  height:32px;
  content:"";
  font-size: 20px;
  float:left;
}
.scl-area li:first-child{
  background:none;
  width:auto;
  float:left;
  margin-top:0px;
  height:auto;

}
.scl-area li:nth-child(3){
  background-position:-55px 0px;  
}
.scl-area li:nth-child(3):hover{
  background-position:-55px -38px;
}
.scl-area li:nth-child(4){
  background-position:-98px 0px;  
}
.scl-area li:nth-child(4):hover{
  background-position:-98px -38px;  
}
.scl-area li:nth-child(5){
  background-position:-141px 0px; 
}
.scl-area li:nth-child(5):hover{
  background-position:-141px -38px; 
}
.scl-area li:nth-child(2){
  background-position: 25px 0px;  
}
.scl-area li:nth-child(2):hover{
  background-position: 25px -38px;  
}
.scl-area li.bdr{
  margin-left: 2px;
  padding-left: 20px;
  width: 70px;
  border-left: 2px solid #fff;
}
a.btn-main{
  display:inline-block;
  border:1px solid #fff; 
  border-radius:5px;
  padding:14px 10px 15px 70px;
  background-color:transparent;
  text-decoration:none;
  color:#fff;
  position:relative;
  font-size:22px;

  transition:All 0.3336s ease-in-out;
  -webkit-transition:All 0.3336s ease-in-out;
  -moz-transition:All 0.3336s ease-in-out;
  -o-transition:All 0.3336s ease-in-out;
}
a.btn-main:hover{
  text-decoration:none;
  background:#000;
  border:1px solid transparent; 
  background:#27579a; 
}
a.btn-main:after{
  position: absolute;
  content: "";
  left: 14px;
  width: 42px;
  height: 42px;
  background-position: -2px -75px;
  top: 9px;
}
.form-section{
  margin:0px auto;
  padding:0px;
  margin-top:20px;
}
.form-section form{
  padding:6px 15px;
  margin:0px;
  background:#fff;
  border-radius:7px;
  text-align:left;
  overflow:hiddensq  margin-bottom:20px;
}
.form-section form label{
  width:100%;
  font-size:14px;
  color:#2a2728;
  margin-top:12px;
  margin-bottom:5px;
  float:left; 
  padding-right: 5px
}
/* Checkbox Stuff */
.form-section form input{
  color:#2a2728;
  min-height:15px;
  border-radius:4px;
  border:1px solid #2a81bb;
  float:left;
  text-indent:6px;
  font-size: 20px;
  width: 100%;


}

.form-section form .box1 img, .form-section form .box2 img, .form-section form .box3 img {
  height: 25px;
  width: auto;
  margin-left: 10px;
  margin-bottom: 50px;
}

.squaredTwo {
  display: inline-block;
  width: 50px;
    height: 25px;

}

.form-section .deflt{
  width:40%;
  margin:0px auto;
  float:none; 
}

/* The CSS */
.form-section form select {
    padding:3px;
    margin: 0;
    -webkit-border-radius:4px;
    -moz-border-radius:4px;
    border-radius:4px;
    background: #f8f8f8;
    color:#888;
    border:none;
    outline:none;
  color:#2a2728;
  width:100%;
  text-indent:6px;
  min-height:40px;
  border:0px;
  border-radius:4px;
  border:1px solid #2a81bb;
  float:left;
    display: inline-block;
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    cursor:pointer;

}


/* Register Button Styling*/
.button{
  display:inline-block;
  background:#428bca;
  border-radius:5px;
  padding: 15px;
  color:#fff;
  position:relative;
  font-size:22px;
  opacity: 0.85;
  text-decoration: none;
  margin-left: 125px;
  transition:All 0.3336s ease-in-out;
  -webkit-transition:All 0.3336s ease-in-out;
  -moz-transition:All 0.3336s ease-in-out;
  -o-transition:All 0.3336s ease-in-out;
}
.button:hover{
  text-decoration:none;
  opacity: 1;
}

/* The CSS */
.form-section form select {
    padding:3px;
    margin: 0;
    -webkit-border-radius:4px;
    -moz-border-radius:4px;
    border-radius:4px;
    background: #f8f8f8;
    color:#888;
    border:none;
    outline:none;
  color:#2a2728;
  width:100%;
  text-indent:6px;
  min-height:40px;
  border:0px;
  border-radius:4px;
  border:1px solid #2a81bb;
  float:left;
    display: inline-block;
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    cursor:pointer;
}
span label:after{
  background: url('images/sprite.png') no-repeat -56px -78px;

}
.form-section form textarea{
  color:#2a2728;
  width:100%;
  min-height:120px;
  border:0px;
  border-radius:4px;
  border:1px solid #2a81bb;
  float:left;
  text-indent:6px;
}

@media (max-width:1200px){
  .form-section .deflt {
    width: 50%;
  }
}
@media (max-width:991px){
  body{
  margin: 0;
  font-family: 'corbel', Arial;
  font-size: 1em;
  color: white;
  background: url(../images/paris3.jpg) no-repeat left top;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;

  }
  .form-section .deflt {
    width: 66%;
  }
}
@media (max-width:830px){
  body {
      margin: 0;
  font-family: 'corbel', Arial;
  font-size: 1em;
  color: white;
  background: url(../images/paris3.jpg) no-repeat left top;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;

  }
}
@media (max-width:767px){
  .form-section .deflt {
    width: 85%;
  }
  body:before, body:after, .bg-3:after{
    background:none;  
  }
  .logo figure{
    margin-top:70px;  
  }


}
@media (max-width: 600px){
  .hero img {
    width: 60%;
  }

 .box2 {
    background-color: orange;
   margin-left: 100px;
margin-bottom: -100px;
  height:120px;
  padding-left: none;
  text-align: center
}

.box3 {
  background-color: blue;
  width:25px;
}

@media (max-width:560px){
  .form-section .deflt {
    width: 97%;
  }
  .form-section form .box1, .form-section form .box2, .form-section form .box3 {
    width: 49%;
  }
  .form-section form .box3{
    margin-top:20px;  
  }
  a.ctnt-btn{
    font-size:16px; 
  }
  .scl-area li:first-child{
    display:block;
    float:none; 
  }
  .scl-area li.bdr {
    margin-left: 0px;
    padding-left: 0px;
    width: 31px;
    border-left: 0px solid #fff;
  }
  .scl-area li:nth-child(2) {
    background-position: -12px 0px;
  }
  .scl-area li:nth-child(2):hover {
    background-position: -12px -38px;
  }
}
@media (max-width:535px){
  .logo figure img{
    width:100%; 
  }
  a.btn-main{
    margin-top:20px;
    margin-bottom:20px; 
     margin-left: 250px;
  }
  .content-section .hm-sec h3{
    margin-bottom:20px; 
  }
  .logo figure{
    margin-top:60px;  
  }
  /* Register Button Styling*/
.button{
  display:inline-block;
  background:#428bca;
  border-radius:5px;
  padding: 15px;
  color:#fff;
  position:relative;
  font-size:22px;
  opacity: 0.85;
  text-decoration: none;
  margin-left: 85px;
  transition:All 0.3336s ease-in-out;
  -webkit-transition:All 0.3336s ease-in-out;
  -moz-transition:All 0.3336s ease-in-out;
  -o-transition:All 0.3336s ease-in-out;
}
.button:hover{
  text-decoration:none;
  opacity: 1;
}
    span label select:after{
  background: url('images/sprite.png') no-repeat -56px -78px;

}

}
@media (max-width:435px){
  .scl-area li:first-child img{
    width:70%;
  }
  a.btn-main{
    font-size:16px; 
  }
  a.btn-main:after{
    top:5px;  
  }
}
@media (max-width:400px){
  .form-section form .box1, .form-section form .box2, .form-section form .box3{
    width:100%; 
  }
  .form-section form .box2 li .squaredTwo {
    /*margin-left: 22px;*/

  }
  .form-section form .box2{
    /*margin-top:15px;*/
  }
}



/* The CSS */
.form-section form select {
    padding:3px;
    margin: 0;
    -webkit-border-radius:4px;
    -moz-border-radius:4px;
    border-radius:4px;
    background: #f8f8f8;
    color:#888;
    border:none;
    outline:none;
  color:#2a2728;
  width:100%;
  text-indent:6px;
  min-height:40px;
  border:0px;
  border-radius:4px;
  border:1px solid #2a81bb;
  float:left;
    display: inline-block;
    -webkit-appearance:none;
    -moz-appearance:none;
    appearance:none;
    cursor:pointer;
}

HTML

<html>
  <head>
    <title></title>
    <style>
      body span:after{
        background: url('images/sprite.png') no-repeat -56px -78px;
      }
    </style>
  </head>
  <body>
    <span>
      <label style="font-weight:normal">
        <select id="industry" name="industry" class="select">
          <option value="">Choisissez votre secteur...</option>
          <option value = "produits chimiques"> </ option> Produits chimiques 
          <option value = "Construction"> Construction </ option> 
          <option value = "Engineering"> Ingénierie </ option> 
          <option value = "financier"> financier </ option> 
          <option value = "FMCG"> FMCG </ option> 
          <option value = "Food / Drink / tabac"> Food / Drink / Tabac </ option> 
          <option value = "Gouvernement"> Gouvernement </ option> 
          <option value = "Santé"> Santé </ option> 
          <option value = "Hightech"> Hightech </ option> 
          <option value = "assurance"> Assurance </ option> 
          <option value = "IT Hardware & amp; Software">Matériel informatique & amp; Logiciel </ option> 
          <option value = "juridique"> Juridique </ option> 
          <option value = "fabrication"> Fabrication </ option> 
          <option value = "Media"> Médias </ option> 
          <option value = "but non lucratif">à but non lucratif </ option> 
          <option value = "Oil & amp; Gaz"> Oil & amp; Gaz </ option> 
          <option value = "Outsourcing"> Externalisation </ option> 
          <option value = "Partenaires"> Partenaires </ option>
          <option value = "Pharmaceuticals"> Pharmaceuticals </ option> 
          <option value = "détail"> détail </ option> 
          <option value = "Service Management"> Service Management </ option> 
          <option value = "Télécommunications"> Télécommunications </ option> 
          <option value = "Transport / Logistique"> Transport / Logistique </ option> 
          <option value = "Utilitaires"> Utilitaires </ option>
        </select>
      </label>
    </span>
  </body>
</html>

1 个答案:

答案 0 :(得分:0)

You can use this

<span>
      <label class="select-label">
                <select name="itemCount" class="select_fd item_count">
                                            <option value="2">2</option>
                                            <option value="5">5</option>
                                            <option selected="selected" value="10">10</option>
                                            <option value="20">20</option>
                                            <option value="30">30</option>
                                            <option value="50">50</option>
                                            <option value="100">100</option>
                                            <option value="150">150</option>
                                            <option value="200">200</option>
                                    </select>
                </label>            </select>
      </label>
    </span>



.select-label select {
    -moz-appearance: none;
    background: none repeat scroll 0 0 #fff;
    border: medium none;
    color: #000;
    float: left;
    font-family: arial;
    font-size: 14px;
    line-height: 21px;
    min-height: 40px;
    padding: 9px 8px 8px 2px;
    text-transform: capitalize;
    width: 100%;
}
.select-label {border-radius: 0 6px 6px 0;
    background: none repeat scroll 0 0 #fff;
    border: 1px solid #ccc;
    float: left;
    min-height: 40px;
    padding: 0;
    position: relative;
    width: 100%;
    margin:20px 0;
}
.select-label:before {
    background: none repeat scroll 0 0 #fff;
    content: "";
    height: 100%;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 0;
    width: 27px;
    z-index: 1;
}
.select-label:after {
    background:url("http://s9.postimg.org/s75ip0ez3/sprite.png") no-repeat scroll -52px -78px transparent;
    height: 41px;
    content: "";   
    pointer-events: none;
    position: absolute;
   right: 0;
    top: 0;
    width: 32px;
    z-index: 1;
}

http://jsfiddle.net/unicodeLucknowM/zjqpn471/