使用 jQuery 进行实时 CSS 编辑
是否有 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这并不是您所要求的通用解决方案,因此请将其扔掉,以防万一这就是您最终想要的。如果您的目标是编辑和使用您的样式,可以使用 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.
谢谢你们——最重要的是感谢 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. :)
现在有几种服务。我个人使用 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.