简体   繁体   中英

How to change font-size of embed text

I have the following code in my html document:

 <embed src="https://www.w3.org/TR/PNG/iso_8859-1.txt" style="width:100%; height: 100%;font-size:1.2em">

Above code grabs a txt file locally, then display its contents in html. The problem is that I am unable to change the font size. Here is what I have tried

  • wrapping (ie, <p><embed src="..."></p> ) and defining a css attribute for the wrapper.
  • defining inner style (ie, <embed style="font-size:1.2em">
  • defining css for embed (ie, embed { font-size: 1.2em } )

None of these work. Please help?

div {font-size: 3em;} div font {font-size: inherit;} It will change the embed text size but some it doesn't work on some editors. Hope it'll helpful

I don't think that you can do this. The only properties allowed on embed are src, type, height and width (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/embed ). It will work similarly to an iframe, so it's an isolated #document inside your tag: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM