问题是我找不到合适的 CSS 样式方法来使 react-day-picker 足够宽以填充所有移动显示。
我尝试自定义 react-day-picker 提供的 css 文件,并应用了很多样式,但都没有成功。
.DayPicker { 显示:弯曲; 弹性方向:行; justify-content: 之间的空格; 字体大小:2.5rem; 边距:0; 边距顶部:2rem; } .DayPicker 包装器 { 位置:相对; 弹性方向:行; 用户选择:无; 宽度:100%; } .DayPicker-月 { 显示:弯曲; 弹性包装:换行; 弹性方向:列; } .DayPicker-月 { 显示:表格; 边距:0; 边距顶部:自动; 边框间距:0; 边框折叠:折叠; 用户选择:无; } .DayPicker-NavBar { 位置:相对; } .DayPicker-NavButton { 位置:绝对; 顶部:1.4rem; 边距顶部:2px; 宽度:1.25em; 高度:1.25em; 背景位置:中心; 背景大小:60%; 背景重复:不重复; 颜色:#8B9898; 光标:指针; 大纲:无; } .DayPicker-NavButton:hover { 不透明度:0.8; } .DayPicker-NavButton--prev { 左:10px; } .DayPicker-NavButton--next { 右:10px; } .DayPicker-NavButton--interactionDisabled { 显示:无; } .DayPicker-Caption { 显示:表格标题; 边距底部:0; 边框:1px 实心#e9e9e9; 填充:0.5em 0.5em; 背景颜色:#f1f1f1; 文本对齐:居中; } .DayPicker-工作日{ 显示:表头组; 上边距:1em; } .DayPicker-WeekdaysRow { 显示:无; } .DayPicker-工作日 { 显示:表格单元格; 填充:0.5em; 颜色:#8B9898; 文本对齐:居中; 字体大小:0.875em; } .DayPicker-Body { 显示:表格行组; } .DayPicker-周 { } .DayPicker-Day { 显示:表格单元格; 填充:0.8em; 边框:1px 实心#d0d4d9; 垂直对齐:中间; 文本对齐:居中; 光标:指针; 宽度:8.9vw; }
我想让日历足够宽以填满我的网络应用程序(移动版)中的所有移动屏幕。