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
<p><embed src="..."></p>
) and defining a css attribute for the wrapper.<embed style="font-size:1.2em">
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.