网址:http://cyberbat.co.uk/test容器边距:自动无效,有没有其他方法可以将它放在IE中间.
编辑:再次检查,index.php是错误的文件,我用index.html替换它.
为什么类型范围的HTML5输入会在移动设备上消失?请参阅此页面,作为移动设备进行检查.我正在开发一个带有表单的简单网站,但需要表单才能在移动设备上运行.谢谢!
我有一个开发站点和生产站点:
我在底部有一个mailto电子邮件链接,php源代码如下:
<section>
<h2>Looking for a LAMP, WordPress or Drupal Developer?</h2>
<p>Contact me today: <br/>
<a href='mailto:mail@example.com'>mail@example.com</a>
<br/>
<a href='tel:+13334445555'>333 444 5555</a>
</p>
</section>
Run Code Online (Sandbox Code Playgroud)
我的开发网站上的一切都很正常,生成的html如下:
<section>
<h2>Looking for a LAMP, WordPress or Drupal Developer?</h2>
<p>Contact me today: <br>
<a href="mailto:mail@example.com">mail@example.com</a>
<br>
<a href="tel:+13334445555">333 444 5555</a>
</p>
</section>
Run Code Online (Sandbox Code Playgroud)
然后神秘地在我的生产网站上一些javascript被添加到我的mailto链接(并且只有mailto链接,在这种情况下只是一个但我已经添加了更多并且脚本也被添加到它们中)这是生产中的html输出现场:
<section>
<h2>Looking for a LAMP, WordPress or Drupal Developer?</h2>
<p>Contact me today: <br>
<a href="mailto:mail@example.com">mail@example.com
<script cf-hash="f9e31" type="text/javascript">
/* <![CDATA[ */!function(){try{var t="currentScript"in document?document.currentScript:function() {for(var t=document.getElementsByTagName("script"),e=t.length;e--;)if(t[e].getAttribute("cf-hash"))return t[e]}();if(t&&t.previousSibling){var …
Run Code Online (Sandbox Code Playgroud) 我$content
使用DOMDocument 解析变量中的html,以将所有iframe替换为图片。foreach仅替换ODD iframe。我已经删除了foreach中的所有代码,并发现引起该问题的代码是:'$ iframe-> parentNode-> replaceChild($ link,$ iframe);'
为什么foreach会跳过所有奇数iframe?
代码:
$count = 1;
$dom = new DOMDocument;
$dom->loadHTML($content);
$iframes = $dom->getElementsByTagName('iframe');
foreach ($iframes as $iframe) {
$src = $iframe->getAttribute('src');
$width = $iframe->getAttribute('width');
$height = $iframe->getAttribute('height');
$link = $dom->createElement('img');
$link->setAttribute('class', 'iframe-'.self::return_video_type($iframe->getAttribute('src')).' iframe-'.$count.' iframe-ondemand-placeholderImg');
$link->setAttribute('src', $placeholder_image);
$link->setAttribute('height', $height);
$link->setAttribute('width', $width);
$link->setAttribute('data-iframe-src', $src);
$iframe->parentNode->replaceChild($link, $iframe);
echo "here:".$count;
$count++;
}
$content = $dom->saveHTML();
return $content;
Run Code Online (Sandbox Code Playgroud)
这是代码的问题所在
$iframe->parentNode->replaceChild($link, $iframe);
Run Code Online (Sandbox Code Playgroud) css ×2
html ×2
php ×2
cloudflare ×1
css3 ×1
foreach ×1
forms ×1
html-parser ×1
html5 ×1
iframe ×1
javascript ×1
mailto ×1
margin ×1
text-align ×1