Quantcast
Channel: 代码片段
Browsing latest articles
Browse All 13 View Live

根据ip定位访问中的位置的php代码

网站拥有根据访问在的ip 来判断是哪个地区的 一些分类信息的网站 常根据你访问者 自动判断你是哪个省 哪个城市的 ,这个功能如果实现呢? function detect_city( $ip ){ $default = 'UNKNOWN' ; if (! is_string ( $ip )|| strlen ( $ip )1|| $ip == '127.0.

View Article



在线解压的php代码

网站简单实现在线解压功能方法 就是使用简单php代码 function unzip_file( $file , $destination ){ //createobject $zip = new ZipArchive(); //openarchive if ( $zip -open( $file )!==TRUE){ die ( 'Couldnotopenarchive' ); }...

View Article

计算两点之间距离的php代码

要能够计算两点之间的距离是多少?下面的函数中使用的两个位置的纬度和经度,计算在两个英里和公制单位它们之间的距离。 function getDistanceBetweenPointsNew( $latitude1 , $longitude1 , $latitude2 , $longitude2 ){ $theta = $longitude1 - $longitude

View Article

检查一年是否是闰年的asp代码

检查一年是否是闰年的asp代码 如下: % 'Copyright(c)2008,reusablecode.blogspot.com;somerightsreserved. ' 'ThisworkislicensedundertheCreativeCommonsAttributionLicense.Toview...

View Article

高端网站开发form表单的jquery控制代码集锦

form表绝对是一个网站的一个非常重要的组成部分,但他们处理起来可有点棘手。为了帮助您与HTML表单的工作更容易,我已经在这篇文章中整理了一些非常实用的jQuery代码片段分享给大家。 在表单中禁用ENTER键 如果你要防止游客不慎被击中ENTER键提交表单,您可

View Article


显示文件大小的php代码

?php function file_size( $url ){ $size = filesize ( $url ); if ( $size =1073741824){ $fileSize = round ( $size /1024/1024/1024,1). 'GB' ; } elseif ( $size =1048576){ $fileSize = round ( $size...

View Article

html5 css重置代码

html5 css重置代码如下:

View Article

支持多少有浏览器的透明css

支持多少有浏览器的透明css .transparent_class{ filter:alpha(opacity= 50 ); -moz-opacity: 0.5 ; -khtml-opacity: 0.5 ; opacity: 0.5 ; }

View Article


将图片转换黑白图的css3代码

将图片转换黑白图的css3代码

View Article


纯CSS角带ribbon

纯CSS角带ribbon 查看演示效果 html 代码 div class = wrapper div class = ribbon-wrapper-green div class = ribbon-green NEWS / div / div / div css代码如下: .wrapper{ margin : 50px auto ; width : 280px ; height : 370px ;...

View Article

纯css的模糊字体代码

下面看看实现效果的html代码 !DOCTYPEhtml html head meta charset = utf -8 / title JSBin / title / head body h1 设计素材网 / h1 / body / html css代码 h 1 { color : #000000 ; /*Oldbrowsersdon'tgotransparent.*/ font-size :...

View Article

自定义滚动条用CSS3和WebKit

记得10年前,几乎没有人使用微软专有属性来自定义滚动条的外观?好了,现在你可以使用Webkit的做同样的。 ::-webkit-scrollbar{ width : 12px ; } ::-webkit-scrollbar-track{ background : none ; } ::-webkit-scrollbar-thumb{ background :-webkit-linear

View Article

针脚边框效果的css3代码

1

View Article

Browsing latest articles
Browse All 13 View Live




Latest Images