當文字要壓在圖片上,可以使用 transform:translate
並配合@media screen 調整文字大小即可
例:
<div style="width:100%; background-image:url(images/bg1.jpg);background-size:cover;background-position:center;position:relative;">
<span id="person" style="position:absolute;color:#E6B800; font-weight:800; font-size:80px; top:64%;left:74%;transform: translate(-64%, -74%); z-index:1000;">文字</span>
<img src="圖片" style="display:block;max-width:100%; margin:0 auto;" >
</div>
stockwfj3 發表在 痞客邦 留言(0) 人氣(9,912)
輸入字母轉成大寫
<input name="first_name" type="text" style="text-transform:uppercase;" placeholder="輸入字母轉大寫" />
輸入字母轉成小寫
<input name="first_name" type="text" style="text-transform:lowercase;" placeholder="輸入字母小寫" />
stockwfj3 發表在 痞客邦 留言(0) 人氣(331)
將下列這一行,存成.htaccess檔,並上傳即可。
Options All -Indexes
stockwfj3 發表在 痞客邦 留言(0) 人氣(49)
<style>
table{
width:auto;
max-width:100%;
}
stockwfj3 發表在 痞客邦 留言(0) 人氣(102)
<?php
require("class.phpmailer.php"); //這個是一個smtp的php文檔,網上可以下載得到
$mail = new PHPMailer(); //建立郵件發送類
$mail->CharSet = "UTF-8";
$address ="gio@ecotw.com.tw";
$mail->IsSMTP(); // 使用SMTP方式發送
$mail->Host = "smtp.126.com"; // 您的企業郵局域名
$mail->SMTPAuth = true; // 啟用SMTP驗證功能
$mail->Username = "startboxfuwu@126.com"; // 郵局用戶名(請填寫完整的email地址)
$mail->Password = "fuwu987654321"; // (驗證碼)
$mail->Port=25;
$mail->From = "startboxfuwu@126.com"; //郵件發送者email地址
$mail->FromName = "小游";
$mail->AddAddress("$address", "小游");//收件人地址,可以替換成任何想要接收郵件的email信箱,格式是AddAddress("收件人email","收件人姓名")
//$mail->AddReplyTo("", "");
stockwfj3 發表在 痞客邦 留言(0) 人氣(68)
<script>
// Find all iframes
var $iframes = $("iframe" );
// Find & save the aspect ratio for all iframes
$iframes.each(function () {
$( this ).data( "ratio", this.height / this.width )
// Remove the hardcoded width & height attributes
.removeAttr( "width" )
.removeAttr( "height" );
});
// Resize the iframes when the window is resized
$( window ).resize( function () {
$iframes.each( function() {
// Get the parent container's width
var width = $( this ).parent().width();
$( this ).width( width )
.height( width * $( this ).data( "ratio" ) );
});
// Resize to fix all iframes on page load.
}).resize();
</script>
stockwfj3 發表在 痞客邦 留言(0) 人氣(454)
<Files ~ ".php">
Order allow,deny
Deny from all
</Files>
stockwfj3 發表在 痞客邦 留言(0) 人氣(111)
<style>
#content img
{
max-width:100% !important;
height:auto !important;
}
</style>
stockwfj3 發表在 痞客邦 留言(0) 人氣(729)
用法
$("#元素").removeAttr('屬性值');
例:
<script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").removeAttr("style");
});
});
</script>
stockwfj3 發表在 痞客邦 留言(0) 人氣(124)
例:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>prop demo</title>
<style>
p {
margin: 20px 0 0;
}
b {
color: blue;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<input id="check1" type="checkbox" checked="checked">
<label for="check1">Check me</label>
<p></p>
<script>
$( "input" ).change(function() {
var $input = $( this );
$( "p" ).html(
".attr( \"checked\" ): <b>" + $input.attr( "checked" ) + "</b><br>" +
".prop( \"checked\" ): <b>" + $input.prop( "checked" ) + "</b><br>" +
".is( \":checked\" ): <b>" + $input.is( ":checked" ) + "</b>" );
}).change();
</script>
</body>
</html>
stockwfj3 發表在 痞客邦 留言(0) 人氣(275)