css - How to control the img tag of textarea?
仅有的幸福
仅有的幸福 2017-06-13 09:23:23
0
3
882
 <textarea class="content" style="width:650px;" name="content" required><p><img src="coverself/1497255947.png" /><img src="coverself/1497255744.png" /></p></textarea>

I want to use css to control all img tags in textarea and apply this syntax

.content p img
{
  height: auto;
  display: block;
  object-fit: cover;
  margin: 0 auto;
  max-width: 100%;
}

But no matter how I write it, he just ignores me. . . . What's wrong? ? ! Ask God

If this is the case

img
{
  height: auto;
  display: block;
  object-fit: cover;
  margin: 0 auto;
  max-width: 100%;
}

But some of my other imgs don’t want to do this

PS textarea uses html editor, what you see

仅有的幸福
仅有的幸福

reply all(3)
小葫芦

If possible, replace textarea with ordinary p, it will be much more convenient.

世界只因有你

No pictures can be placed in textarea

黄舟

Check the style of the browser console to see if it is overwritten by other weights, or the selector is not selected at all

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template