【uniapp】小程序中input输入框的placeholder-class不生效

解决方法

1.去掉scoped

<style></style>

2.额外写一组style

</style lang="scss" scoped>

</style>

<style>

::v-deep .textarea-placeholder {

font-size: 24rpx;

font-weight: 400;

// color: rgba(176, 184, 194, 1);

color: red;

}

</style>

3.样式穿透

scss

::v-deep .textarea-placeholder {

font-size: 24rpx;

font-weight: 400;

// color: rgba(176, 184, 194, 1);

color: red;

}

less

/deep/ .textarea-placeholder {

font-size: 24rpx;

font-weight: 400;

// color: rgba(176, 184, 194, 1);

color: red;

}

相关推荐
会豪1 天前
Electron-Vite (一)快速构建桌面应用
前端
中微子1 天前
React 执行阶段与渲染机制详解(基于 React 18+ 官方文档)
前端
唐某人丶1 天前
教你如何用 JS 实现 Agent 系统(2)—— 开发 ReAct 版本的“深度搜索”
前端·人工智能·aigc
中微子1 天前
深入剖析 useState产生的 setState的完整执行流程
前端
遂心_1 天前
JavaScript 函数参数传递机制:一道经典面试题解析
前端·javascript
小徐_23331 天前
uni-app vue3 也能使用 Echarts?Wot Starter 是这样做的!
前端·uni-app·echarts
RoyLin1 天前
TypeScript设计模式:适配器模式
前端·后端·node.js
遂心_1 天前
深入理解 React Hook:useEffect 完全指南
前端·javascript·react.js
Moonbit1 天前
MoonBit 正式加入 WebAssembly Component Model 官方文档 !
前端·后端·编程语言
龙在天1 天前
ts中的函数重载
前端