You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Chrome DevTools复制元素CSS样式输出变为多行,如何设置恢复为单行模式?

How to Restore Single-Line CSS Style Copying in Chrome DevTools

Absolutely! I’ve run into this exact issue after a Chrome update too—luckily there’s a simple setting to switch back to single-line CSS copies. Here’s what you need to do:

  • Open Chrome DevTools (use the shortcut F12 or Ctrl+Shift+I on Windows/Linux, Cmd+Opt+I on Mac).
  • Click the gear icon ⚙️ in the top-right corner to open DevTools Settings.
  • Go to the Preferences tab (it’s usually the first one loaded).
  • Scroll down to the Elements section—look for the checkbox labeled "Copy styles as single line".
  • Check that box, then close the Settings panel.

From now on, when you right-click an element in the Elements panel and select Copy > Copy styles (or use the corresponding shortcut), the CSS will be copied as a single line instead of being split across multiple lines. If you ever want to go back to the multi-line format later, just uncheck that same box.

内容的提问来源于stack exchange,提问作者Tompina

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.29 09:37:29