使用 jQuery 进行实时 CSS 编辑

发布于 2024-09-24 14:41:34 字数 94 浏览 0 评论 0原文

是否有 jQuery 插件或通常有一个包含当前打开网页的 CSS 代码的 textarea 方法,该代码将在编辑过程中自动更新(无需重新加载页面)?

Is there a plugin for jQuery or generally a method to have a textarea containing CSS code of the currently open web page which will be automatically updated during edit (without page reload)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

表情可笑 2024-10-01 14:41:34

这并不是您所要求的通用解决方案,因此请将其扔掉,以防万一这就是您最终想要的。如果您的目标是编辑和使用您的样式,可以使用 Firebug 或 Chrome 的 内置开发者工具

JavaScript 版本是 Firebug Lite

It's not exactly a general solution you're asking for, so just throwing this out there in case it's what you're ultimately after. If your goal is to edit and play with your styles there's Firebug, or Chrome's built-in developer tools.

The JavaScript version is Firebug Lite.

椵侞 2024-10-01 14:41:34

谢谢你们——最重要的是感谢 Takeshin(他对我原来的问题发表了评论)。

Takeshin 的评论对我帮助很大:使用 jQuery,我将编辑后的 ​​CSS 代码从名为 Codemirror 的代码荧光笔插入到头部页面的。就这么简单。 :)

Thank you guys – most of all thanks to takeshin (who posted a comment to my original question).

takeshin's comment helped me quite a bit: With jQuery, I inserted the edited CSS code from a code highlighter called Codemirror into the head of the page. It's as simple as that. :)

撧情箌佬 2024-10-01 14:41:34

现在有几种服务。我个人使用 codr.io。对于不太实时的情况,我使用 jsfiddle.net

There are now several services out there. I personally use codr.io. For not-quite real-time I use jsfiddle.net.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文