php – 我的CSS代码没有正确读取TinyMCE
发布时间:2020-12-13 22:44:47 所属栏目:PHP教程 来源:网络整理
导读:几个月前,我发布了一个关于如何在图片上方悬停时显示标题的问题. 这是线程: Don’t understand how to show the caption when hovering image 问题是,当我使用TinyMce编辑标题时,它不会显示标题悬停.相反,它没有显示任何标题,它只是徘徊. 这是编辑方面(我缩
几个月前,我发布了一个关于如何在图片上方悬停时显示标题的问题.
这是线程: Don’t understand how to show the caption when hovering image 问题是,当我使用TinyMce编辑标题时,它不会显示标题悬停.相反,它没有显示任何标题,它只是徘徊. 这是编辑方面(我缩短了它): <script language="javascript" type="text/javascript">//<![CDATA[ tinyMCE.init({ // General options mode: "textareas",elements : "ajaxfilemanager",theme : "advanced",}); //]]</script> 这是输出: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body> <style> #caption { display: none;font:12px Times New Roman;} img:hover + #caption { position: absolute; display: block;} .caption { display:none; text-decoration: none; font:12px Times New Roman;} .image-with-caption:hover .caption {display: block; text-decoration: none;} a:hover { text-decoration: none; } </style> <table width="100%"> <tr> <td> <?php echo(stripslashes($_POST['content'])); ?> </td> </tr> </table> </body> </html> 这是我将代码复制并粘贴到TinyMCE中的输入: <table width="100%"> <tr> <td> <div class="image-with-caption"> <a href="images/artistc.php"> <img src="images/imagec08.jpg" style="width:209px" /> <p id="caption">Caption 3</p> </a> </div> </td> <td> <div class="image-with-caption"> <a href="images/artistb.php"> <img src="images/imageb12.jpg" style="width:195px" /> <p id="caption">Caption 5</p> </a> </div> </td> <td> <div class="image-with-caption"> <a href="images/artista.php"> <img src="images/imagea02.jpg" style="width:260px" /> <p id="caption">Caption 4</p> </a> </div> </td> </tr> </table> 任何建议和意见将不胜感激.我只是想知道为什么它没有显示标题. 解决方法
我不完全理解你的问题,但我看到你有几个ID相同的标签.这是不允许的.也许如果你解决了这个问题,它有助于解决问题.你应该用class =“caption”(或其他任何东西)替换id =“caption”,然后用.caption修改你的css替换#caption
(编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |