How to style jQuery datePicker Calendar?(如何设置jQuery日期选择器日历的样式?)
本文介绍了如何设置jQuery日期选择器日历的样式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正尝试在div中使用DatePicker。我想在DatePicker日历打开时扩大div的高度。
我有一个类似的div:
.dateBox{
width:160px;
height:auto;
border:1px solid blue;
}
问题是,当您点击DatePicker输入并打开日历时,.DateBox的高度不会改变。我一直在胡闹,但我想不通……
我如何修复它?
直播:http://jsfiddle.net/fcrsznb1/2/
提前感谢!
推荐答案
.ui-datepicker {
width: 300px;
height: 300px;
margin: 5px auto 0;
font: 12pt Arial, sans-serif;
/*-webkit-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5);
-moz-box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, .5);*/
}
.ui-datepicker table {
width: 100%;
}
.ui-datepicker-header {
background: #3399ff;
color: #ffffff;
font-family:'Times New Roman';
border-width: 1px 0 0 0;
border-style: solid;
border-color: #111;
}
.ui-datepicker-title {
text-align: center;
font-size: 15px;
}
.ui-datepicker-prev {
float: left;
cursor: pointer;
background-position: center -30px;
}
.ui-datepicker-next {
float: right;
cursor: pointer;
background-position: center 0px;
}
.ui-datepicker thead {
background-color: #f7f7f7;
/*border-bottom: 1px solid #bbb;*/
}
.ui-datepicker th {
background-color:#808080;
text-transform: uppercase;
font-size: 8pt;
color: #666666;
/*text-shadow: 1px 0px 0px #fff;*/
/*filter: dropshadow(color=#fff, offx=1, offy=0);*/
}
.ui-datepicker tbody td {
padding: 0;
/*border-right: 1px solid #808080;*/
}
.ui-datepicker tbody td:last-child {
border-right: 0px;
}
.ui-datepicker tbody tr {
border-bottom: 1px solid #bbb;
}
.ui-datepicker tbody tr:last-child {
border-bottom: 0px;
}
.ui-datepicker a {
text-decoration: none;
}
.ui-datepicker td span, .ui-datepicker td a {
display: inline-block;
/*font-weight: bold;*/
text-align: center;
width: 30px;
height: 30px;
line-height: 30px;
color: #ffffff;
/*text-shadow: 1px 1px 0px #fff;*/
/*filter: dropshadow(color=#fff, offx=1, offy=1);*/
}
.ui-datepicker-calendar .ui-state-default {
background: linear-gradient(#999999, #737373);
color:#ffffff;
height:40px;
width:40px;
}
.ui-datepicker-calendar .ui-state-hover {
background: #33adff;
color: #FFFFFF;
}
.ui-datepicker-calendar .ui-state-active {
background: #33adff;
-webkit-box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, .1);
-moz-box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, .1);
box-shadow: inset 0px 0px 10px 0px rgba(0, 0, 0, .1);
color: #e0e0e0;
text-shadow: 0px 1px 0px #4d7a85;
border: 1px solid #55838f;
position: relative;
margin: -1px;
}
.ui-datepicker-unselectable .ui-state-default {
background: #D6E4BE;
color: #000;
}
这篇关于如何设置jQuery日期选择器日历的样式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
编程基础网
本文标题为:如何设置jQuery日期选择器日历的样式?
基础教程推荐
猜你喜欢
- 在 Javascript 中使用 Fetch API 上传文件并显示进度 2022-01-01
- 最佳动态 JavaScript/JQuery 网格 2022-01-01
- CORS:当凭据标志为真时,无法在 Access-Control-Allow-Origin 中使用通配符 2022-01-01
- 逻辑运算符 ||在 javascript 中,0 代表 Boolean false? 2022-01-01
- 从快速中间件中排除路由 2022-01-01
- 当木偶师打开Chrome时,不能使用Chrome扩展 2022-01-01
- 使用 jQuery 在悬停时交换 DIV 类 2022-01-01
- HTML5 画布调整为父级 2022-01-01
- 带角度的选项卡:仅使用 $http 在单击时加载选项卡 2022-01-01
- 即使每次插入第一个输入的值不同,第二个输入仍显示相同的输入值 2022-01-01
