jquery 屏幕大小判断
<script> $(function () { if($(window).width() <= 760){ $("#css").attr("href","./static/css/style_m.css"); } }); </script>
swiper 不同屏幕显示不同方式
breakpoints: { 320: { //当屏幕宽度大于等于320 slidesPerView: 2, slidesPerGroup: 2, spaceBetween: 50 }, 1000: { //当屏幕宽度大于等于768 slidesPerView: 3, slidesPerGroup: 3, spaceBet...
curl post提交例子
<?php $host = "/"; $path = "/wyc/title"; $method = "POST"; $apikey = "你要调用API的apikey"; $headers = array(); array_push($headers, &quo...
js 鼠标移上去修改style属性
演示效果鼠标移上去,颜色显示为红色,鼠标移开,颜色显示为黑色。获取id对象:document.getElementById()鼠标移上去:onmouseover鼠标移开:onmouseout<!DOCTYPE html> <html lang=&q...
pbootcms常用代码存放
1.pbootcms采集时,如果想要设置定期发布,可以在发布PHP文件里面,增加如下代码:if(file_exists("num.txt")){ $updata_num = file_get_contents("num.txt"); $updata_num...
pbootcms ajax 无刷新加载下一页技术
js代码://先定义一些基本的内容 //Page就是第几页,由当前页{page:current} + 1,就是第二页,parseInt确保该数值是Int类型。 var Page = parseInt('{page:current}') + 1; //Num就是每页几条信...
网站侧边客服代码 折叠式 圆球客服展示
首先是html代码:<section id="cebian"> <div class="all close"> <div class="shang"> <div class="mune"> <p>Chat w...
帝国cms获取内容里面的图片 php
if(empty($add['titlepic'])){ $str = $add['newstext']; $isMatched = preg_match("/<img .*?(?=src)src=\"([^\"]+)\"/si", $str, $matches); $add['titlepic'] =...
仿写一个抖音footer的底部 html
css代码:* { box-sizing: border-box; margin: 0; padding: 0; } a { text-decoration: none; color: #fff } #footers .footer { background: #171725; min-height: 188px; font-size: 14px; c...