如何更改 jquery UI 数据选择器的样式 (CSS)

how to change style (CSS) of jquery ui datapicker

本文关键字:样式 CSS 选择器 何更改 jquery UI 数据      更新时间:2023-09-26

我是PHP和JavaScript的新手。 我在我的网页中使用jquery UI数据选择器。 我用了这个日历

http://jqueryui.com/download

它的CSS代码是

    <style type="text/css">
        /*demo page css*/
        body{ font: 62.5% "Trebuchet MS", sans-serif; margin: 50px;}
        .demoHeaders { margin-top: 2em; }
        #dialog_link {padding: .4em 1em .4em 20px;text-decoration: none;position: relative;}
        #dialog_link span.ui-icon {margin: 0 5px 0 0;position: absolute;left: .2em;top: 50%;margin-top: -8px;}
        ul#icons {margin: 0; padding: 0;}
        ul#icons li {margin: 2px; position: relative; padding: 4px 0; cursor: pointer; float: left;  list-style: none;}
        ul#icons span.ui-icon {float: left; margin: 0 4px;}
    </style>

HTML代码是:

 <td>Required Date:</td>
  <td>
   <script>
    $(function() {
        $( "#datepicker" ).datepicker();
             });
   </script>

<div class="demo">
<p><input type="text" id="datepicker"></p>
</div><!-- End demo -->

<div class="demo-description" style="display: none; ">
--some description
</div><!-- End demo-description -->
</td>
现在的问题是这个日历的正文样式

是在整个页面上实现的,而我的页面还有另一个CSS文件..如果我删除这个日历的正文样式,那么我的日历看起来太大了。. i want the size of my calendar is same as mentioned in body style. what should i do.. please need help

在这里 -> http://jqueryui.com/demos/datepicker/单击主题,您将找到一些基本类,您可以自定义它们。 只需玩这些类,直到您的日期选择器看起来像您需要的那样。 如果您尝试过此操作但无法使其正常工作,请报告进度,我们将看到问题所在。