最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to wrap text inside an iframe with designMode on, using css and also javascript if necessary? - Stack Overflow

programmeradmin0浏览0评论

Any simple solution to this dilemma? I've tried this possible solution, but it didn't seem to work inside iframes.

Help?

JSFiddle Link

EDIT: I've searched myself online, and they all say specify a percentage. But I don't initially have content in it, and I set designMode to 'On'. Just to mention to filter out useless answers.

Any simple solution to this dilemma? I've tried this possible solution, but it didn't seem to work inside iframes.

Help?

JSFiddle Link

EDIT: I've searched myself online, and they all say specify a percentage. But I don't initially have content in it, and I set designMode to 'On'. Just to mention to filter out useless answers.

Share Improve this question edited May 23, 2017 at 12:05 CommunityBot 11 silver badge asked Jul 14, 2012 at 8:08 ZeriumZerium 17.3k32 gold badges118 silver badges186 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 9

Ha, solved! Used javascript:

myiframe.document.body.style.wordWrap = 'break-word';

that did it when put into window.onload.

Solved, finally!

In CSS you could do it by using word-wrap: break-word;

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论