老师,帮我看看,日期的格式显示不出来,检查代码没发现哪里有毛病

来源:2-2 样式编写

蒹葭苍沧

2020-10-12 09:09

.ui-datapicker-wrapper{    width: 240px;    font-size: 16px;    color: #666;    box-shadow: 2px 2px 8px 2px rgba(128,128,128,0.3);}.ui-datapicker-wrapper .ui-datapicker-header{    padding: 0 20px;    height: 50px;    line-height: 50px;    border-bottom: 1px solid #ccc;    background: #f0f0f0;    font-weight: bold;    text-align: center;}.ui-datapicker-wrapper .ui-datapicker-btn{    font-family: serif;    width: 20px;    height: 50px;    line-height:50px;    font-size: 20px;    text-decoration: none;    text-align: center;    color:#1bac9c;    cursor: pointer;}.ui-datapicker-wrapper .ui-datapicker-prev-btn{    float: left;}.ui-datapicker-wrapper .ui-datapicker-next-btn{    float:right;}.ui-datapicker-wrapper .ui-datapicker-body table{    width: 100%;    border-collapse: collapse;}.ui-datapicker-wrapper .ui-datapicker-body th,.ui-datapicker-wrapper .ui-datapicker-body td{    height: 30px;    text-align: center;}.ui-datapicker-wrapper .ui-datapicker-body th{    font-size: 12px;    height: 40px;    line-height: 40px;}.ui-datapicker-wrapper .ui-datapicker-body td{    border: 1px solid #f0f0f0;    font-size: 10px;    cursor: pointer;}


写回答 关注

2回答

  • 蒹葭苍沧
    2020-10-12 09:14:54

    检查出来了,ui-datapicker-body中的一个字母写错了,晕死,谢谢大家?

  • 蒹葭苍沧
    2020-10-12 09:10:58
    <!--源码如下:-->
    <DOCTYPE html><html lang='zh-cn'>    <head>        <title>datepicker</title>        <meta charset="utf-8">        <link rel='stylesheet' type='text/css' href='datapicker.css'>    </head>    <body>        <div class='ui-datapicker-wrapper'>            <div class='ui-datapicker-header'>                <a href='#' class='ui-datapicker-btn ui-datapicker-prev-btn'>&lt;</a>                <a href='#' class='ui-datapicker-btn ui-datapicker-next-btn'>&gt;</a>                <span class='ui-datapicker-curr-month'>2020-10</span>            </div>            <div class="ui-datepicker-body">                <table>                    <thead>                        <tr>                            <th>一</th>                            <th>二</th>                            <th>三</th>                            <th>四</th>                            <th>五</th>                            <th>六</th>                            <th>日</th>                        </tr>                    </thead>                    <tbody>                        <tr>                            <td>28</td>                            <td>29</td>                            <td>30</td>                            <td>1</td>                            <td>2</td>                            <td>3</td>                            <td>4</td>                        </tr>                        <tr>                            <td>5</td>                            <td>6</td>                            <td>7</td>                            <td>8</td>                            <td>9</td>                            <td>10</td>                            <td>11</td>                        </tr>                        <tr>                            <td>12</td>                            <td>13</td>                            <td>14</td>                            <td>15</td>                            <td>16</td>                            <td>17</td>                            <td>18</td>                        </tr>                        <tr>                            <td>19</td>                            <td>20</td>                            <td>21</td>                            <td>22</td>                            <td>23</td>                            <td>24</td>                            <td>25</td>                        </tr>                        <tr>                            <td>26</td>                            <td>27</td>                            <td>28</td>                            <td>29</td>                            <td>30</td>                            <td>31</td>                            <td>1</td>                        </tr>                    </tbody>                </table>            </div>        </div>        </body></html>


DatePicker组件开发

使用原生JS完成一个日期选择器(datepicker)组件的开发

17741 学习 · 64 问题

查看课程

相似问题