HTML5前端
html5播放mp3 代码
2020-11-18
<audio controls="controls">
<source src="http://fm0898.com/song.ogg" type="audio/ogg">
<source src="http://fm0898.com/song.mp3" type="audio/mpeg">
fm0898站长提醒您,您的浏览器过老,不支持此文件播放!
</audio>
网址判断代码
2020-02-26
if(window.location.href.indexOf("fm0898.com") < 0){
window.location.href = 'https://www.0898.com/';
}
html5 网页html lang 用法
2019-12-20
1. 简体中文页面:html lang=zh-cmn-Hans
2. 繁体中文页面:html lang=zh-cmn-Hant
3. 英语页面:html lang=en
注意:单一的 zh 和 zh-CN 均属于废弃用法。
html5自适应下如何让图片不显示
2019-06-26
@media (max-width:750px)
{.hello img { display:none;}}
我们先把CSS写好,再添加样式到前端想要隐藏的地方
<div class="hello">
<img src="images/1.gif" border="0" />
</div>
让传统网站直接压缩适应手机方法
2019-05-04
<meta name="viewport" content="width=device-width,height=device-height,inital-scale=1.0,maximum-scale=1.0,user-scalable=no;">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format
隐藏页面中XY滚动条方法
2019-05-03
<div style="overFlow-x: hidden; OVERFLOW: scroll; SCROLLBAR-DARKSHADOW-COLOR: #ffffff; HEIGHT: 140px" align=center></div>
在style样式中加入overFlow-x: hidden;就能把水平滚动条给去掉了。
如果想把垂直滚动条给去掉就用overFlow-y: hidden;如果想要只是在内容超出的情况下才出现滚动条,那就把hid
浏览器选择CSS及关闭兼容模式
2019-05-03
<!doctype html>
<!--[if IE 7]> <html class="ie7" > <![endif]-->
<!--[if IE 8]> <html class="ie8" > <![endif]-->
<!--[if IE 9]> <html class="ie9" > <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en-US"> <!-
阿光家民宿网站为例 直接给CSS添加雅黑字体方法
2019-05-03
这几天在给阿光家民宿制作新的html5网站模板的时候,发现WP主题中自带的字体不好看,且不同的页面或者区域字体还不一致,于是动手统一使用同一字体了!
直接打开主题目录下的style.css文件,如果是其他CMS,请打开全站所有模板通用的一个CSS文件,直接在最顶部添下CSS字体定义代码!
*html{font-family:"Microsoft YaH