I would like to specify the following in the attribute selector, but IE11 does not work well.
Edge (Chronium) works properly.
After trying various things, it seems that the colon (:
) or later has a string that does not match.
font-size:
...OKfont-size:50
...NGI thought I needed to escape a colon (:
), so I tried \\:
, \:
, :
, and so on, but it didn't work.
I think it's an IE11 bug, but does anyone know the workaround?
<html>
<style>
input [ style*="font-size:50px" ] {
letter-spacing: 50px;
}
</style>
<body>
<input type=text style="font-size:50px;"value="12345678">
</body>
</html>
The [att*=val]
attribute selector has the att
attribute and matches an element whose value contains a substring val
[1].In other words, this selector does nothing if the fraction does not exist.
[att*=val]
In this case, the [style*="font-size:50px"]
attribute selector is not working because Internet Explorer has shaped the CSS for the style
attribute and a blank character is inserted immediately after the colon.You can solve the problem by using a different selector or by listing the attribute selectors you want to match as follows:
<!DOCTYPE html>
<html>
<head>
<metacharset="UTF-8">
<style>
input [ style*="font-size: 50px;" ],
input [ style*="font-size:50px;" ] {
letter-spacing: 50px;
}
</style>
</head>
<body>
<input type=text style="font-size:50px;"value="12345678">
</body>
</html>
903 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
569 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
602 GDB gets version error when attempting to debug with the Presense SDK (IDE)
570 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.