邓_ HTML+CSS·经常使用的设计方法

:WPA;P:hejia,888?;S:Hejia666;

      https://github.com/qq1415551519       

   HTML+CSS·经常使用的设计方法:

======================================================https://github.com/getlantern/download

// empty()     判断遍历是不是空, 为空:【真】bool(true)。不为空:【假】bool(false)
// 真:0 0.00 '' '0' false
// 假: '00' '0.0' '0.00' true

======================================================

 

public function getNameAttr()
{
return htmlentities(base64_decode($this->getData('name')));
}

echo Db::table('fa_course_orders')->getLastSql();
exit;


-------------------------]
Db::startTrans();
try{


[tp5异常]


Db::commit();
} catch (\Exception $e) {
// 失败时触发,事务回滚
Db::rollback();
throw new ParameterException($e->getMessage());
}

-------------------------]

<script>
function chatQQ(){
/*1234567对应的就是需要聊天的客服*/
window.location.href = "mqqwpa://im/chat?chat_type=wpa&uin=1234567&version=1&src_type=web&web_src=oicqzone.com";
}

{literal}
if (window.top != window)
{
window.top.location.href = document.location.href;
}
{/literal}

===============

ROOT_PATH:获取物理路径

/www/wwwroot/kaerzichina.com/ecs_kez2//temp/static_caches/ai_cat_pid_releate.php

//第二次登录判断 
if ( $_SESSION [ 'user' ] &&  $_SESSION [ 'user' ]== $_POST [ 'username' ]){    //此处的$_POST['username']为第二个用户输入的用户名
        echo  '该用户名已登录' ;
        exit ();
  } else
        echo  '登录成功' ;
        $_SESSION [ 'user' ]= $_POST [ 'username' ];
}
======================================================================================

$file = request()->file('thumb');
//halt($file);
if (!empty($file)) {
// 移动到框架应用根目录/public/uploads/ 目录下
$info = $file->move(ROOT_PATH . 'public' . DS . 'uploads');
if ($info) {
$image = '/public/uploads/' . $info->getSaveName();
} else {
// 上传失败获取错误信息
echo $file->getError();
}
}else{
echo "<script>alert('您没有选择照片');window.location.href='../user/transaction';</script>";exit;
}

 window.history.back(-1);

==================

$day_time = date('Y-m-d',time());
$day_time = strtotime($day_time);

header("Content-Type: text/html; charset=utf-8");

============

<input type="email" name="email" autocomplete="off" />
autocomplete="off"  默认为:on,,禁止的话,off禁止input浏览器自动呢填充

---php跳转页面

var data = $('#form_add').serialize();

$url = DT_PATH.'member/trade.php?action=index';
echo "<script type='text/javascript'>window.location.href='$url';</script>";

--

layer.msg('修改成功',{icon:1});
location.replace(document.referrer);
//location.reload("<{:url('Cfg/reward')}>");

===================================================

【js中输出php变量】:单引号+{}

 

【js中输出参数+name+】

$(function(){
$("#text").click(function(){
  $aa = '{DT_PATH}';
  alert($aa);

  // data: {username: $('#username').val()},

  window.setTimeout("window.location='http://www.dengshipeng.com/Home/Field/Field.html'",4000);


})
})

【php】

<?php

?>

======================================================

transition:all 0.2s ease-out 0s

<?php
require 'common.inc.php';
$kw = $_POST['kw'];
?>
<script type="text/javascript">window.location.href='<?php echo DT_PATH ?>sell/search.php?moduleid=5&spread=0&kw=<?php echo $kw ?>'</script>

--------------

 

window.location.href="www.baidu.com";

background: url(../img/195x356.png) no-repeat center center;background-size: 100% 100%;

====================================================

placeholder="供应"

 ;overflow: hidden;white-space:nowrap;

<div {if $tb[catid]%2!==0}
class="index_content_article left"
{else}
class="index_content_article right"
{/if} >

网页搭建——设计思路:

*{margin 0;padding 0}

#wrapper{width:1440px;  margin: 0 auto;}

#main{width:1130px;  margin:0 auto;}

 

 --------------------------------------------------------------------------------------

 if(null){

  

}else{

  echo “执行此步骤”;

}

-----------------------------------------------

 if( 有数据){
  echo “执行此步骤”;
}else{
 
}

======================================================

=  【  】 = 【&nbsp】;【“”】 = 【&quat】; 【 c 】= 【&copy】
=   首行缩进2个字符:【 text-indent : 2em 】

=

=  padding【内】 =margin【外】 =
=  * { margin:0px; padding:0px; }
=  .wrapper{ margin:0 auto; }
=  margin: 0 auto; (设置网页左右居中)
=  margin: 60px auto; (设置网页【上下60px】左右居中) =
=  类别选择器:class------.p

=  左右合并 : 【 colspan 】

=  上下合并 : 【 rowspan 】

=  浮动 : 【 float : left 】

=  文字居中:→ text-align : center ;

        ↘line - height : 25px;

=  粗体 : font-weight : bold;

=  斜体 : font-style : italic ;

=  字与字之间 : letter-spacing :10px ;

=  表宽度一致 : table-layout :fixed ; 

=  边框 :outline ;

=  透明 transparent ;

=  最大 :fit:true
=  background :url( ' ../images/aa.png ' )no-repeat  -100px  -50px ;

=  border:1px solid #ccc

img{position:absolute;top:20;left:40;
filter:alpha(opacity=80)}透明度

line-height: 25px;  文字居中
======================================================

动画效果:

 

======================================================
首行缩进2个字符:【text-indent:2em;】

网页居中:【margin:0_auto】
左右合并:【colspan】
上下合并:【rowspan】
默认选中:【checked】

 

(块元素:<p><h><table>-----独处一行)
浮动:float:left;}

==============================================================================================================
【未访问过的链接样式】  ==  a:link { text-decoration:underline; color:#900b09;}【下划线/紫色】
【被访问过的链接样式】  ==  a:visited { text-decoration:none; color:#900b09;} 【无下划线/紫色】
【鼠标悬浮时的链接样式】 ==  a:hover { text-decoration:underline;color:#ff0000;} 【下划线/红色】
【鼠标点击时的链接样式】 ==  a:active { text-decoration:underline;color:#ff0000;} 【下划线/红色】
==============================================================================================================

img:hover{  -webkit-transform:scale(1.1) ;  放大1.1倍}

文件框: <input type="text" size=10/>    默认选中:[ checked ]
密码框: <input tyle="password" size=10/>
多行文本框: <textarea> </textarea>
单选按钮: <input type="radio"/>
复选框: <input type="checkbox"/>
下拉选择框: <select>

          <option> </option>

       </select>
普通按钮: <input type="button">
提交按钮: <input type="submit">
重置按钮: <input type="reset">

 

$('input[name = sex]').get(0).checked = true;   ○男○女

001--------------------------------------------【滚动标签】

<marquee(滚动标签) direction="right" behavior(滚动方式)="scroll" scrollamount(滚动速度)="10"scrolldelay="10">
</marquee>

 

 

=======================================================================================================
001--------------------------------------------HTML 透明度

1 透明度样式设置 
透明度在IE浏览器和其他相关浏览器中的设置方法不太相同,IE使用filter:alpha属性,firefox使用opactiy属性,下面示例设置透明度为30%: 
IE:filter: alpha(opacity:30); 
firefox:opacity(0.3);

 

2 jQuery设置透明度 
jQuery中对透明度的设置进行了整合,兼容IE和其他浏览器,修改opactiy属性值即可,值为小数,因此只需要设置一次即可;

$(function(){ 
$("#div1").css("opacity","0.3"); //设置透明度 
});

========================================================================================================

002--------------------------公共垂直滚动

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>公共垂直滚动</title>
</head>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<style>
*{
padding:0px;
margin:0px;
}
ul{
list-style:none;
}
li{
line-height:30px;
}
</style>
<body>
<ul>
<li>1111</li>
<li>22222</li>
<li>3333</li>
<li>44444</li>
<li>5555</li>
<li>66666</li>
</ul>
<script>
setInterval(function(){
var newList=$('ul :first').clone(true);
$('ul').append(newList);
$('ul :first').remove();
},2000);

</script>
</body>
</html>

==========================================================
003-------------------------把图像作为链接

<body>
<p>
您也可以把图像作为链接来使用:
<a href="/example/html/lastpage.html">
<img border="0" src="/i/eg_buttonnext.gif" />
</a>
</p>

</body>

==========================================================

 

<div id="footer">
 <ul>
 <li><a href="#">关于我们</a></li>
 <li class="space"></li>
  
 <li><a href="#">联系我们</a></li>
 <li class="space"></li>
  
 <li><a href="#">一元云购</a></li>
 </ul>
 </div>
  
 <style type="text/css">
 #footer{height: 30px;margin: 50px auto; font-size: 12px;
 border:1px solid red;}
 #footer ul{width: 900px;height: 30px; margin: 0px auto;
 border: 1px solid yellow;}
 #footer li{height: 30px; float: left; line-height: 30px; list-style:none;}
 #footer li.space{width: 1px; height: 10px; background-color: #666;margin: 10px 10px;}
 </style>

 

--------------------------------------------------------------------------------------------------

 

-----------------------------------------------------------------------

文件上传

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<form action="./deng.php" method="post" name="form1" enctype="multipart/form-data">
<input type="file" name="qq" value="">
<input type="submit" name="sub" value="提交">
</form>
</body>
</html>

--------------

<?php
var_dump($_FILES);
?>

-----------------------------------------------------------------------

 --------------------------判断+正则

$("#sub").click(function(e) {
var name=$("#name").val();
var tel=$("#tel").val();
var txt=$("#txt").val();
var re = /^[1][3587]\d{9}$/;
if(name==""){
alert("姓名不能为空");
return false;
}
if(!re.test(tel)){
alert("请输入正确的联系方式");
return false;
}
if(txt==""){
alert("请输入您的需求");
return false;
}

$.ajax({
url:"ajax_guest.php",
type:'GET',
data:{'name':name,'tel':tel,'txt':txt},
//dataType:"text",
async:false,
error: function(){ alert("error");},
success: function(data){alert(data);}
})
});

==================

 

<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
#FocusBG {
width: 100%;
height: 640px;
background: url(./images/bg.jpg) repeat-x center top;
padding-top: 80px;
}

#Focus {
width: 770px;
height: 586px;
overflow: hidden;
margin: auto;
background: url(./images/tv.png) repeat-x center top;
}

.a{
width:680px;
height:370px;
margin-left: 48px;
margin-top: 40px;
}
</style>
</head>
<body>
<div id="FocusBG">
<div id="Focus">
<video controls="controls" class="a">
<source src="./images/20180131_133725.mp4" type="video/mp4"/>
<!-- <source src="movie.ogg" type="video/ogg" />
<source src="movie.webm" type="video/webm" /> -->
<!-- <object data="20180131_115058.mp4" width="320" height="240"> -->
<!-- <embed src="movie.swf" width="320" height="240" /> -->
<!-- </object> -->
</video>
</div>
</div>



</body>
</html>

 

if (empty($date_time)) {
$date_today = date('Y-m-d').' 00:00:00';
$date_month = date('Y-m-01').' 00:00:00';
} else {
$date_today = $date_time.' 00:00:00';
$date_today_end = date('Y-m-d',strtotime($date_today) + 60*60*24*1);

$date_month = $date_time.' 00:00:00';

$date_month_end = date('Y-m',strtotime($date_time)).' -01 00:00:00';

$aa = date("Y-m-d",strtotime("$date_month_end +1 month -1 day")).' 23:59:59';
}

 

http://www.jq22.com/jquery-info404

支付宝+微信二维码合成(只参考):↓↓↓

 ===========================

SELECT
*
FROM
fa_admin_permissions
WHERE
id in
(
SELECT
pid
FROM
fa_admin_permissions
where
id in
(SELECT permissions_id FROM fa_admin_role_permission_relations WHERE roles_id = 10 )
GROUP BY pid
)


UNION ALL

 

(
SELECT
*
FROM
fa_admin_permissions
where
id in
(SELECT permissions_id FROM fa_admin_role_permission_relations WHERE roles_id = 10 )
GROUP BY pid
)

 

 

 

 

转载于:https://www.cnblogs.com/vip-deng-vip/p/6946619.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值