css - 如何在 chartist.js 中为图表背景着色
问题描述
我可能遗漏了一些简单的东西,但我无法使用 chartist.js 更改图表的背景颜色
.ct-grid {
background: black;
background-color: black;
stroke:black;
fill:black;
}
我正在尝试仅更改网格区域,而不是整个区域,因此我没有使用ct-chart ct-golden-section
有任何想法吗?
解决方案
下面可能会让您了解如何继续.. 可能使用一些 CSScalc()
来找到合适的尺寸,这样您就不会静态设置它们
.ct-golden-section:before {
display: block;
float: left;
content: "";
width: 100%;
height: 413px; //set as the size of the container
padding-bottom: 449px; //set as the size of the container
background: yellow; // set the bg color wanted for the container
border-style: solid;
border-top-width: 15px;
border-left-width: 49px;
border-color: orange; // choose the color of the page u have
border-bottom-width: 25px;
border-right-width: 39px;
}
检查屏幕截图以查看上述结果:
https://drive.google.com/file/d/15-vuRMXn2NspkNWfIuvcEZ8xxOEUeEgd/view?usp=sharing
请任何人随时编辑我的临时解决方案
推荐阅读
- c - 我想使用 scanf 将值存储在 C 语言中的二维数组中。但它不像我想要的那样存储它
- java - 通知 LED 未亮起
- javascript - 多次包含 Google Maps JavaScript API + initMap 不是函数(无效值)
- css - 如何使用 TailwindCSS 在 div 中创建全高元素
- android - Xamarin Android Style Xml 属性
- java - JPA在循环之前或之后不正确的合并
- r - 转换 data.frame 中除一个变量外的所有变量
- wordpress - 调用未定义的函数 settings_fields()
- scala - Scala Play:如何动态设置每种语言的响应视图?
- reactjs - 如何使 TextField 输入更宽?