我想在YouTube视频上显示div,但无法使其正常工作.我知道如果将wmode设置为透明或不透明,那么它应该可以工作,但是当< embed>或< object>标签被使用. YouTube现在将视频嵌入到< iframe>所以当我尝试它,它没有工作.这是我的代码如何.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <Meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title></title> <style type="text/css">@import "reset.css";</style> <style type="text/css"> body { background:#000; font:62.5%/240% Helvetica,Arial,sans-serif; overflow:hidden; /* To avoid showing a scrollbar */ } div { background:#f00; position:absolute; min-width:100%; min-height:100px; z-index:99; } </style> </head> <body> <div></div> <iframe width="100%" height="100%" src="http://www.youtube.com/v/8lVJV--SrGg&loop=1&autoplay=1&autohide=1&hd=1&modestbranding=1" frameborder="0" allowfullscreen></iframe> </body> </html>