怎么引用class?
这个需要引用样式文件,就是所说的class
<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/bootstrap-3.3.4.css"> <link rel="stylesheet" href="css/citySelect.css">
html代码
<div class="search"> <div class="citySelect"> <span class="cityName">北京</span> <i class="iconDown"></i> <i class="line"></i> </div> <div class="dropDown"> <div class="dropProv"> <ul class="dropProvUl dropUl"></ul> </div> <div class="dropCity"> <ul class="dropCityUl dropUl"></ul> </div> </div> </div>
需要调用的js文件
<script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script> <script type="text/javascript" src="js/citySelect.js"></script>
以上代码加入到你的html文件中,对应好路径就行了