<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
高洛峰2017-06-13 09:25:23
If possible, replace textarea with ordinary p, it will be much more convenient.
黄舟2017-06-13 09:25:23
Check the style of the browser console to see if it is overwritten by other weights, or the selector is not selected at all