javascript - 在css中将ch转换为Px
解决方案
1ch 将是 8px - 从下面的示例代码中得到这个:
.convertedDiv1 {
height: 1ch;
width: 1ch;
background-color: red;
}
.convertedDiv2 {
height: 2ch;
width: 2ch;
background-color: green;
}
.convertedDiv3 {
height: 3ch;
width: 3ch;
background-color: blue;
}
div {
margin-bottom: 12px;
}
<div class="convertedDiv1"></div>
<div class="convertedDiv2"></div>
<div class="convertedDiv3"></div>
推荐阅读
- c# - 如何在 UWP 和 C# 中动态重建 DLL?
- google-apps-script - file.getas('application/pdf') 正在将嵌入式网址更改为 google.com 查询
- visual-studio - 返回向量
在函数或 recursive_directory_iterator 内。未处理的异常 - android - Ionic 4 中的 AdMobFree 4 根本不会在 banner.prepare() 中返回 Promise 对象
- flutter - 如何在 Flutter 图表中设置范围的最小值和最大值?
- go - 在 Go 中使用接口调度方法
- html - HTML 标记是否不适合或不正确地用于导航栏?
我在下面发布了一些代码,这些代码为网站制作了一个非常基本的导航栏。它使用表格进行布局,使用 CSS 进行间距。但是,我不确定这是否被认为是“最佳”方式。
<table>
用于元素周期表或其他数据以外的其他内容是否不正确?非常感谢!
HTML 代码
<table clas
- css - 修改hr标签时CSS无效的属性值
- android-studio - 如何将彩色图像导入 Android Studio 3.6?
- javascript - 无论如何使用lodash对数字对象的json数组进行排序/排序