Vue : Select
<template><div>
<select v-model="mychoice">
<option value="html">HTML</option>
<option value="css">CSS</option>
<option value="js">JS</option>
</select>
<p>Your choise is: <b>{{mychoice}}</b></p>
</div>
</template>
<script>
export default {
data:function(){
return{
mychoice:''
}
}
}
</script>
<style>
select {
appearance: none;
-webkit-appearance: none;
-moz-appearance: none;
background: url(./arrow.png) no-repeat;
background-position-x: 99%;
background-position-y: 50%;
background-size: 15px;
border:1px solid #E0E0E0;
position: relative;
height:25px;
width:50%;
text-align-last: left;
left:24%;
}
p {
margin-top:8px;
position: relative;
width:50%;
text-align: center;
left:24%;
}
</style>
以上是 Vue : Select 的全部内容, 来源链接: utcz.com/z/376077.html