博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
designmode_designMode
阅读量:2524 次
发布时间:2019-05-11

本文共 1255 字,大约阅读时间需要 4 分钟。

designmode

Every once in a while I stumble upon an API or browser setting that I can't believe ever existed. Such examples can be seen in the numerous String.prototype properties such as bold, italics, and even blink, which wrap given string text in their representative HTML tags. Bizarre.

偶尔我偶然发现我不相信的API或浏览器设置。 可以在大量的String.prototype属性(例如bolditalics ,甚至blink看到此类示例,这些属性将给定的字符串文本包装在其代表性HTML标签中。 奇怪

It was recently brought to my attention the API: an on|off switch that acts almost like a contentEdible attribute for the entire document. You can toggle designMode by simply changing the setting:

最近引起我注意的是 API:一个on|off开关,其作用几乎类似于整个文档的contentEdible属性。 您可以通过简单地更改设置来切换designMode

document.designMode = "on";

With the designMode setting on, you can edit page text, drag and drop assets, and generally cause chaos on the page. This is really nice for prototyping; I'd have loved to have known about this while doing client work.

designMode设置后,您可以编辑页面文本,拖放资产,并且通常会导致页面混乱。 这对于原型制作真的很好。 我很想在做客户工作时就知道这一点。

While I see uses for this API, it does feel a bit bizarre. I'd have liked to have known the origins of this property and its use cases. Have ideas about how you'd use it? Share!

虽然我看到此API的用途,但确实感觉有些奇怪。 我很想知道此属性的起源及其用例。 有关于如何使用它的想法吗? 分享!

翻译自:

designmode

转载地址:http://sxswd.baihongyu.com/

你可能感兴趣的文章
Linux总结
查看>>
llg的农场(farm)
查看>>
Delphi的FIFO实现
查看>>
Anti StrongOD Kernel Mode
查看>>
bootstrap字体图标在谷歌显示正常,在火狐显示异常的问题
查看>>
Luogu CF22C 【System Administrator】
查看>>
【原】使用less实现随机下雪动画
查看>>
Urozero Autumn 2016. UKIEPC 2016
查看>>
ActiveReport使用心得(四):WebForm下的显示类型及数据的导出
查看>>
《精通CSS:高级Web标准解决方案》学习笔记之二:可视化格式模型
查看>>
Flash调用Lua脚本: 五
查看>>
一次oracle大量数据删除经历
查看>>
npm重要知识点梳理
查看>>
Windows 7安装Service Pack 1失败问题
查看>>
How To Move Or Rebuild A Lob Partition
查看>>
请求的内容似乎是脚本,因而将无法由静态文件处理程序来处理解决方案
查看>>
3-STM32物联网开发WIFI+GPRS基础篇(开发板测试-GPRS)
查看>>
CSS教程:彻底掌握Z-index属性
查看>>
C++中值类型形参、指针类型形参和引用形参的探讨
查看>>
css3:bacground-size
查看>>