text-color { color: #333; } .text-font { font-family: Arial, sans-serif; } .text-size text-align-right { text-align: right; } </style> </head> <body> <p class="text-color text-font <em>text-size</em> </p> <p class="text-color text-font text-size text-align-center">Center aligned text.
Right aligned text.
minzoom: 14.5, 'layout': { 'text-field': ['get', 'name'], 'text-size 'icon-allow-overlap': false, 'text-field': ['get', 'district'], 'text-size 'icon-allow-overlap': false, 'text-field': ['get', 'district'], 'text-size 'icon-allow-overlap': false, 'text-field': ['get', 'name'], 'text-size 'icon-allow-overlap': false, 'text-field': ['get', 'name'], 'text-size
completed-bg="completedBg" :handler-bg="handlerBg" :handler-icon="handlerIcon" :text-size
与 CSS 自定义属性结合 :root { --base-size: 4px; --title-multiplier: 5; --body-multiplier: 3; } .title { text-size : calc(var(--title-multiplier) * var(--base-size)) } .body { text-size: calc(var(--body-multiplier)*
type': 'symbol', 'source': 'points', 'layout': { 'text-field': ['get', 'type'], "text-size
calc() 与 CSS 自定义属性结合:root {--base-size: 4px;--title-multiplier: 5;--body-multiplier: 3;}.title {text-size : calc(var(--title-multiplier) * var(--base-size))}.body {text-size: calc(var(--body-multiplier)* var
], "text-font": [ "微软雅黑" ], "text-size
geojson-label', 'type': 'symbol', 'source': 'geojson', layout: { 'text-field': ['get', 'name'], 'text-size
pointGeojsonSource", layout: { "text-field": ["get", "name"], // 使用get表达式来获取"title"属性 "text-size pointGeojsonSource", layout: { "text-field": ["get", "name"], // 使用get表达式来获取"title"属性 "text-size "", // 如果是群岛城市,不显示名字 // ["get", "name"], // 如果不是群岛城市,显示名字 // ], // "text-size
source': 'indoor', 'layout': { 'text-field': ['get', 'name'], 'text-size
symbol', 'source': 'geojson', 'layout': { 'text-field': ['get', 'name'], "text-size
filter': ["==", ['get', 'floor'], 0], 'layout': { 'text-field': ['get', 'name'], "text-size
grid-cluster', layout: { 'text-anchor': "center", 'text-field': "{count}", 'text-size
比如, 我们新建一个 stylesheet 文件并放到用户目录下的 style 文件下面: node { fill-color: #a1d99b; size: 20px; text-size
icon-allow-overlap': true, 'text-field': ['get', 'name'], 'text-size
type: "symbol", layout: { 'text-allow-overlap': false, 'text-size
<pstyle="<em>text-size</em>:bold"> C. p {font-weight:bold} D. p {text-size:bold} 2.
例如: { background-url : "javascript:alert(1)"; } // 和其他所有URL { text-size: "expression(alert('XSS'))"
text-height:auto; th:a text-height:font-size; th:f text-height:text-size