html - 如何更改谷歌地图 mapType 控制器的字体大小?
问题描述
我可以更改谷歌地图 mapType 控制器的大小,但不能更改字体大小。是否可以通过 html 或 css 更改字体大小?
HTML:
<div #map id="map" style="height:250px;"></div>
CSS:
#map{
height: 100%;
width: 100%;
font-size: 15px;
}
.gm-style-mtc > div:first-child {
width: 60px;
height: 20px;
font-size: 15px;
}
.gm-style-mtc > div > div {
width: 100%;
height: 100%;
font-size: 15px;
}
解决方案
您是否尝试过添加!important
属性?
!important
property 忽略其他 CSS 规则,并应用那些具有!important
属性的规则。例如:
.gm-style-mtc > div:first-child {
width: 60px;
height: 20px;
font-size: 15px !important;
}
.gm-style-mtc > div > div {
width: 100%;
height: 100%;
font-size: 15px !important;
}
我希望这有帮助!
推荐阅读
- c++ - 对 C++ 中的无符号短行为感到困惑
- ios - Swift/iOS - 大量内存使用归因于“__StringStorage”?
- node.js - `npm install` 在 node-gyp 重建时失败,并带有`gyp:未检测到 Xcode 或 CLT 版本!`
- java - java.sql.SQLSyntaxErrorException:未知数据库“用户信息”
- javascript - 根据初始 window.innerHeight 值切换底部菜单是否安全?
- python - Python,如何按字符串列按升序对数据框进行排序
- python - Selenium 代码无法抓取堆栈溢出
- scala - Athena-在一列中使用 JSON 查询表
- r - 图例中的回归线应该更细
- assembly - 将数据存储在偏移寄存器 386 masm