.selector { width: 150px; height: 64px; /*px*/ font-size: 28px; /*px*/ border: 1px solid #ddd; /*no*/}复制代码 1. 2. 3. px2rem-loader 基于 px2rem 实现,很多用法和 px2rem 类似 https://github.com/Jinjiang/px2rem-loader复制代码 1. 2. 3. 配置完成,本地运行,看到如下效果,...
4、初始化 index.css 全局样式如下::root{font-size:12px;} 二、封装es-header组件 2.1 创建并注...
font-size: 2.5rem; margin: 1rem 0; } .WordCard p:last-child { font-style: italic; font-size: 0.5rem; } </style> 我们在<div>中设置了WordCard,在<style>里配置它的样式,生成一个圆角边框,让单词卡看起来像个卡片的样子。 最后我们把英语卡片组件 FlashCard.vue 和它的数据 wordlists.js,汇总...
2.在根目录src下建立文件夹utils,然后创建rem.js文件 // 基准大小constbaseSize=16// 设置 rem 函数functionsetRem(){// 当前页面宽度相对于 1920 宽的缩放比例,可根据自己需要修改。constscale=document.documentElement.clientWidth/1920// 设置页面根节点字体大小, 字体大小最小为12letfontSize=(baseSize*Math.m...
fontSizeMax 字体大小,最大值 number 40 backgroundColorMin 背景颜色色值最小值,最小为 number 180 backgroundColorMax 背景颜色色值最大值,最大为255 number 240 colorMin 字体颜色色值最小值,最小为0 number 50 colorMax 字体颜色色值最大值,最大为255 number 160 lineColorMin 干扰线颜色色值最小值,最小为...
Quill.register(fontSizeStyle, true); ··· 在editor的配置中配置size字体大小 ··· editorOption: { placeholder: "请编辑文本内容", modules: { toolbar: { container: [ ["bold", "italic", "underline", "strike"], //加粗,斜体,下划线,删除线 ["...
子组件可通过:class="$attrs.class"承接传递的class style :style="{ color: activeColor, fontSize: fontSize + 'px' }" // 也支持短横线方式 'font-size' // 可以绑定多个对象数组 :style="[baseStyles, overridingStyles]" 会自动添加浏览器前缀,通过数组分别对不同前缀赋值...
{ flex: 1; display: flex; flex-direction: column; justify-content: space-between; padding-right: 10px; } .news .left .title { font-size: 20px; } .news .left .info { color: #999999; } .news .left .info span { margin-right: 20px; } .news .right { width: 160px; height: ...
(0,0%,100%,0.95);//菜单选中背景色$base-menu-background-active:$base-color-default;//标题颜色$base-title-color:#fff;//字体大小配置$base-font-size-small:12px;$base-font-size-default:14px;$base-font-size-big:16px;$base-font-size-bigger:18px;$base-font-size-max:22px;$base-font-...
.position{padding: 0.16rem 0;line-height: .22rem;font-size: .16rem;.position__icon{font-size: .2rem;}}复制代码 ⭐️ 根据稿图,我们可以看出消息提醒的icon是在地址栏中居右的。所以我们可以使用绝对定位的方式让它靠右显示。 .position{position: relative;padding: 0.16rem 0;line-height: .22re...