I want to insert an image into marquee tag.
I have written following code:
<marquee scrollamount="4" behavior="alternate" direction="right" width="300"><img width="180px" style="padding-left:30px;opacity:0.7" src="img/cloud3.png"></marquee>
Its working fine in firefox and IE but not working in chrome. What is the problem.? Please reply as early as possible. Thanks in advance.
The MARQUEE element was first created by Internet Explorer and was eventually supported by Chrome, Firefox, Opera, and Safari, but it is not an official part of the HTML specification. If you must create a scrolling section of your page, it's best to use CSS instead.
The HTML <marquee> tag defines a scrolling text area in the HTML document that moves across the page in a horizontal or vertical direction. By default, text found within the <marquee> tag will scroll from right to left. The <marquee> tag has been deprecated in HTML5 and should no longer be used.
The marquee element creates scrolling text that is difficult to read and click on. Beyond that, it can be distracting to viewers, especially to those with low vision, cognitive disabilities, or attention deficits. People with attention deficits or cognitive disabilities could become distracted by content that scrolls.
Use CSS animation instead of <marquee> CSS animation enables you to create the marquee effect and make it user-friendly by using the prefers-reduced-motion media query to stop all animations for those who don't want them.
Because the marquee
tag is a crime against nature. And it's no longer supported in newer versions of Chrome.
The marquee
is not supported in modern html. Chrome dropped support for it a while ago. You need to implement this via CSS3 or Javascript.
Further W3C states that it is non standard and should not be used.
The effect can be easily acheived via jQuery or via CSS3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With