好得很程序员自学网
  • 首页
  • 后端语言
    • C#
    • PHP
    • Python
    • java
    • Golang
    • ASP.NET
  • 前端开发
    • Angular
    • react框架
    • LayUi开发
    • javascript
    • HTML与HTML5
    • CSS与CSS3
    • jQuery
    • Bootstrap
    • NodeJS
    • Vue与小程序技术
    • Photoshop
  • 数据库技术
    • MSSQL
    • MYSQL
    • Redis
    • MongoDB
    • Oracle
    • PostgreSQL
    • Sqlite
    • 数据库基础
    • 数据库排错
  • CMS系统
    • HDHCMS
    • WordPress
    • Dedecms
    • PhpCms
    • 帝国CMS
    • ThinkPHP
    • Discuz
    • ZBlog
    • ECSHOP
  • 高手进阶
    • Android技术
    • 正则表达式
    • 数据结构与算法
  • 系统运维
    • Windows
    • apache
    • 服务器排错
    • 网站安全
    • nginx
    • linux系统
    • MacOS
  • 学习教程
    • 前端脚本教程
    • HTML与CSS 教程
    • 脚本语言教程
    • 数据库教程
    • 应用系统教程
  • 新技术
  • 编程导航
    • 区块链
    • IT资讯
    • 设计灵感
    • 建站资源
    • 开发团队
    • 程序社区
    • 图标图库
    • 图形动效
    • IDE环境
    • 在线工具
    • 调试测试
    • Node开发
    • 游戏框架
    • CSS库
    • Jquery插件
    • Js插件
    • Web框架
    • 移动端框架
    • 模块管理
    • 开发社区
    • 在线课堂
    • 框架类库
    • 项目托管
    • 云服务

当前位置:首页>后端语言>PHP
<tfoot draggable='sEl'></tfoot>

php圆角透明 css透明空心圆

很多站长朋友们都不太清楚php圆角透明,今天小编就来给大家整理php圆角透明,希望对各位有所帮助,具体内容如下:

本文目录一览: 1、 easyphpthumbnail,phpthumb哪 个更好 2、 css圆角问题 ie浏览器下设置圆角后,圆角哪里不透明,显示的是tab的颜色,如图 3、 utf-8 转换圆角怎么实现? 用php写的 4、 php添加超链接变透明了,如何解决? 5、 用php怎么做圆形头像 6、 php怎么输出背景透明的图片? easyphpthumbnail,phpthumb哪 个更好

EasyPHPThumbnail类可以处理图像和PHP生成缩略图支持GIF、JPG和PNG。这个类是免费的,基于100%的PHP,可用于PHP4(4.3.11以上)和PHP5,易于使用,并提供了超过60的功能操作:

提供的功能包括:调整大小,裁剪,旋转,翻转,另存为,阴影,水印,文字,边框,锐化,模糊,水波纹,反射镜,透视,动画,置换贴图和更多!

使用简介

1、基本使用

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Createthumb('gfx/image.jpg');

?>

2、动态显示指定大小图片

<?php

include_once('inc/easyphpthumbnail.class.php');

// Your full path to the images

$dir = str_replace(chr(92),chr(47),getcwd()) . '/gfx/';

// Create the thumbnail

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 300;

$thumb -> Createthumb($dir . 'img.jpg');

?>

3、生成静态多张本地图片

<?php

include_once('inc/easyphpthumbnail.class.php');

// Your full path to the images

$dir = str_replace(chr(92),chr(47),getcwd()) . '/gfx/';

$dir_thumbs = str_replace(chr(92),chr(47),getcwd()) . '/thumbs/';

if(!is_dir($dir_thumbs)) mkdir($dir_thumbs,0777);

// Create the thumbnail

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 600;

$thumb -> Copyrighttext = 'SCUTEPHP.COM';

$thumb -> Copyrightposition = '50% 90%';

$thumb -> Copyrightfonttype = $dir . 'handwriting.ttf';

$thumb -> Copyrightfontsize = 30;

$thumb -> Copyrighttextcolor = '#FFFFFF';

$thumb -> Chmodlevel = '0755';

$thumb -> Thumblocation = $dir_thumbs;

$thumb -> Thumbsaveas = 'jpg';

$thumb -> Thumbprefix = '120px_thumb_';

$thumb -> Createthumb(array($dir . '69.jpg', $dir . '70.jpg'), 'file');

?>

4、图片大小百分比调整及图片旋转

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 50;

$thumb -> Rotate = 90;//指定度数旋转

//$thumb -> Fliphorizontal = true; //水平轴旋转

//$thumb -> Flipvertical = true; //垂直轴旋转

$thumb -> Percentage = true;

$thumb -> Createthumb('gfx/image.jpg');

?>

Thumbsize默认是px像素单位,然而要用百分比的话可以设置Percentage属性为ture,Rotate属性设置顺时针旋转度数。

5、给缩略图增加背景阴影

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Backgroundcolor = '#D0DEEE';

$thumb -> Shadow = true;

$thumb -> Createthumb('gfx/image.jpg');

?>

6、给缩略图增加圆角效果

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Backgroundcolor = '#D0DEEE';

$thumb -> Clipcorner = array(2,15,0,0,1,1,0);

$thumb -> Createthumb('gfx/image.jpg');

?>

Clipcorner属性的7个参数含义

[0]: 0=关闭 1=直角 2=圆角

[1]: 裁剪比例

[2]: 随机 - 0=关闭 1=开启

[3]: 左上 - 0=关闭 1=开启

[4]: 左下 - 0=关闭 1=开启

[5]: 右上 - 0=关闭 1=开启

[6]: 右下 - 0=关闭 1=开启

7、给缩略图增加透明效果

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Backgroundcolor = '#0000FF';

$thumb -> Clipcorner = array(2,15,0,1,1,1,1);

$thumb -> Maketransparent = array(1,1,'#0000FF',30);

$thumb -> Createthumb('gfx/image.jpg');

?>

8、给缩略图增加框架效果

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Framewidth = 10;

$thumb -> Framecolor = '#FFFFFF';

$thumb -> Backgroundcolor = '#D0DEEE';

$thumb -> Shadow = true;

$thumb -> Createthumb('gfx/image.jpg');

?>

9、给缩略图增加经典相框效果

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Framewidth = 10;

$thumb -> Framecolor = '#FFFFFF';

$thumb -> Backgroundcolor = '#D0DEEE';

$thumb -> Shadow = true;

$thumb -> Binder = true;

$thumb -> Binderspacing = 8;

$thumb -> Clipcorner = array(2,15,0,1,1,1,0);

$thumb -> Createthumb('gfx/image.jpg');

?>

10、给缩略图增加水印效果

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 300;

$thumb -> Framewidth = 10;

$thumb -> Framecolor = '#00000';

$thumb -> Backgroundcolor = '#000000';

$thumb -> Clipcorner = array(2,15,0,1,1,1,1);

$thumb -> Watermarkpng = 'watermark.png';

$thumb -> Watermarkposition = '50% 50%';

$thumb -> Watermarktransparency = 70;

$thumb -> Createthumb('gfx/image.jpg');

?>

11、给缩略图增加短文本及相框

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 300;

$thumb -> Framewidth = 10;

$thumb -> Framecolor = '#00000';

$thumb -> Borderpng = 'border.png';

$thumb -> Copyrighttext = 'MYWEBMYMAIL.COM';

$thumb -> Copyrightposition = '50% 80%';

$thumb -> Copyrightfonttype = 'handwriting.ttf';

$thumb -> Copyrightfontsize = 30;

$thumb -> Copyrighttextcolor = '#FFFFFF';

$thumb -> Createthumb('gfx/image.jpg');

?>

12、缩略图按指定形状裁剪

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 300;

$thumb -> Borderpng = 'cloud.png';

$thumb -> Createthumb('gfx/image.jpg');

?>

13、指定区域裁剪图片

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 300;

$thumb -> Cropimage = array(2,0,20,20,35,35);

$thumb -> Createthumb('gfx/image.jpg');

?>

Cropimage属性六个参数说明

[0]: 0=disable 1=enable free crop 2=enable center crop

[1]: 0=percentage 1=pixels

[2]: Crop left

[3]: Crop right

[4]: Crop top

[5]: Crop bottom

14、裁剪出旧照片效果

<?php

include_once('inc/easyphpthumbnail.class.php');

$thumb = new easyphpthumbnail;

$thumb -> Thumbsize = 300;

$thumb -> Shadow = true;

$thumb -> Backgroundcolor = '#D0DEEE';

$thumb -> Cropimage = array(2,0,20,20,35,35);

$thumb -> Ageimage = array(1,10,80);

$thumb -> Createthumb('gfx/image.jpg');

?>

15、属性或方法详解

A

$thumb -> Addtext = array()// 对原始图像添加文字

数组有六个参数

[0]: 0=disable 1=enable

[1]: The text to add

[2]: The position of the text '50% 50%' is the center

[3]: Path to the TTF font (standard systemfont will be used)

[4]: The fontsize to use

[5]: The copyright text color in web format '#000000'

$thumb -> Ageimage = (array) // 应用灰度 array(1,0,0) 或者旧照片效果 array(1,10,80)

数组有六个参数

[0]: Boolean 0=disable 1=enable

[1]: Add noise 0-100, 0=disable

[2]: Sephia depth 0-100, 0=disable (greyscale)

$thumb -> Applyfilter = (boolean)// 应用用户自定义3x3过滤器

B

$thumb -> Backgroundcolor = (string)// Web格式的背景 '#FFFFFF'

$thumb -> Binder = (boolean) // 在缩略图左边画一粘合剂

$thumb -> Binderspacing = (int) // 以像素为单位的空间

$thumb -> Blur = (boolean) // 模糊过滤器

$thumb -> Borderpng = (string) // 边框PNG图片路径

$thumb -> Brightness = (array) // 改变图片亮度

数组有两个参数

[0]: Boolean 0=disable 1=enable

[1]: Brightness -100 to 100

C

$thumb -> Chmodlevel = (string) // 设置保存图片的权限 '0755'

$thumb -> Clipcorner = (array) // 设置圆角 array(2,15,0,1,1,1,0)

数组有七个参数

[0]: 0=disable 1=straight 2=rounded

[1]: Percentage of clipping

[2]: Clip randomly Boolean 0=disable 1=enable

[3]: Clip top left Boolean 0=disable 1=enable

[4]: Clip bottom left Boolean 0=disable 1=enable

[5]: Clip top right Boolean 0=disable 1=enable

[6]: Clip bottom right Boolean 0=disable 1=enable

$thumb -> Colorreplace = (array)// 颜色替换 array(1,'#FFFFFF','#FF6600',60)

数组有四个参数

[0]: Boolean 0=disable 1=enable

[1]: Color to replace in web format: '#00FF00'

[2]: Replacement color in web format: '#FF0000'

[3]: RGB tolerance 0 - 100

$thumb -> Colorize = (array) // 合并图像中的颜色 array(1,0,0,125,0)

数组有五个参数

[0]: Boolean 0=disable 1=enable

[1]: Red component 0 - 255

[2]: Green component 0 - 255

[3]: Blue component 0 - 255

[4]: Opacity level 0 - 127

$thumb -> Contrast = (array)// 改变图像的对比度 array(1,30)

数组有2个参数

[0]: Boolean 0=disable 1=enable

[1]: Contrast -100 to 100

$thumb -> Copyrighttext = (string) // 增加版权文本

$thumb -> Copyrightposition = (string) // 版权文本位置 '50% 50%' is the center

$thumb -> Copyrightfonttype = (string)// TTF文字字体路径 (standard systemfont will be used)

$thumb -> Copyrightfontsize = (int)// 字体大小

$thumb -> Copyrighttextcolor = (string) // 文字Web格式颜色值 '#000000'

$thumb -> Createthumb('imagepath'[,'output']) // 创建或者输出缩略图

函数有两个参数

[string/array]: 原图片完整路径字符串或数组

[string]: Output to the 'screen' (standard) or 'file' (option)

$thumb -> Createbase64('imagepath')// 以base64数据输出图片

函数有一个参数

[string]: Filename for image to convert

$thumb -> Createcanvas(i,i,i,s,b)// 创建一个画布图像 - use with Createthumb()

函数有五个参数

[int]: Canvas width in pixels

[int]: Canvas height in pixels

[int]: Imagetype PHP: IMAGETYPE_PNG, IMAGETYPE_GIF, IMAGETYPE_JPEG

[string]: Fill color

[boolean]: Transparent (boolean)

$thumb -> Create_apng(array, string, int)// 创建APNG缩略图

函数有三个参数

[array]: Array with filenames of PNG images (frames)

[string]: Filename for APNG: 'animation.png'

[int]: Delay between frames in milliseconds

$thumb -> Cropimage = (array)// 裁剪 array(0,0,20,20,20,20)

数组有六个参数

[0]: 0=disable 1=free crop 2=center crop 3=square crop

[1]: 0=percentage 1=pixels

[2]: Crop left

[3]: Crop right

[4]: Crop top

[5]: Crop bottom

$thumb -> Croprotate = (boolean)// 裁剪图片到同样大小的画布并旋转

D

$thumb -> Displacementmap = (array) // 变形

数组有7个参数: array(1,'gfx/displacementmap.jpg',0,0,0,50,50)

[0]: 0=disable 1=enable

[1]: Path to displacement image (grey #808080 is neutral)

[2]: 0=resize the map to fit the image 1=keep original map size

[3]: X coordinate for map position in px

[4]: Y coordinate for map position in px

[5]: X displacement scale in px

[6]: Y displacement scale in px

$thumb -> Displacementmapthumb = (array) // 缩略图变形

数组有七个参数: array(1,'gfx/displacementmap.jpg',0,0,0,50,50)

[0]: 0=disable 1=enable

[1]: Path to displacement image (grey #808080 is neutral)

[2]: 0=resize the map to fit the image 1=keep original map size

[3]: X coordinate for map position in px

[4]: Y coordinate for map position in px

[5]: X displacement scale in px

[6]: Y displacement scale in px

$thumb -> Divisor = (int)// The divisor for the 3x3 filter

E

$thumb -> Edge = (boolean)// 边缘过滤器

$thumb -> Emboss = (boolean) // 浮雕过滤器

F

$thumb -> Fliphorizontal = (boolean)// 在水平轴翻转图像

$thumb -> Flipvertical = (boolean) // 在垂直轴翻转图像

$thumb -> Filter = (array)// 3x3矩阵 array(-1,-1,-1,-1,8,-1,-1,-1,-1)

数组有九个参数

[0]: a1,1

[1]: a1,2

[2]: a1,3

[3]: a2,1

[4]: a2,2

[5]: a2,3

[6]: a3,1

[7]: a3,2

[8]: a3,3

$thumb -> Framewidth = (int)// 添加缩略图框架(像素)

$thumb -> Framecolor = (string) // 框架颜色 '#FFFFFF'

css圆角问题 ie浏览器下设置圆角后,圆角哪里不透明,显示的是tab的颜色,如图

border-radius:5px

ie下另写程序 圆角是好的,如下图

出现这种问题,估计是easyui中某个样式引起的吧~

解决方案:一种办法是把tab的背景 渐变一下,设置header-gradient-from,颜色和背景色相差无几,不过不好看

但有个缺陷是 无背景条的tab圆角有些问题 如上图中左上角的tab

这时就需要重写一下有背景的tab样式,效果如下

.tabs li.tabs-selected a.tabs-inner {

    background-color: #ffffff;

    color: #0E2D5F;

    background: -webkit-linear-gradient(top,#cccccc,#ffffff 100%);

    background: -moz-linear-gradient(top,#cccccc,#ffffff 100%);

    background: -o-linear-gradient(top,#cccccc,#ffffff 100%);

    background: linear-gradient(to bottom,#cccccc,#ffffff 100%);

    background-repeat: repeat-x;

    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#cccccc,endColorstr=#ffffff,GradientType=0);

}

utf-8 转换圆角怎么实现? 用php写的

<?php

echo ' web-root = '.$_SERVER['DOCUMENT_ROOT'].'<br>';

echo ' current-file = '.__FILE__.'<br>';

echo ' current-dir = '.dirname(__FILE__).'<br>';

echo ' http-root = '.$_SERVER['HTTP_HOST'].'<br>';

echo ' web-position = '.$_SERVER['PHP_SELF'].'<br>';

$file='c:/webroot/index.php';

echo ' file-position = '.$file.'<br>';

$fileWebAddress='http://'.str_replace($_SERVER['DOCUMENT_ROOT'],$_SERVER['HTTP_HOST'],$file);

echo ' file-web-position = '.$fileWebAddress.'<br>';

?>

php添加超链接变透明了,如何解决?

在A标签上增加CSS代码 ,下边给出的是红色的你可以试一试,有问题可以再和我联系。

style="color: red;"

用php怎么做圆形头像

做法有两种:

第一种:就是用个透明的图片遮挡做头像,显示圆角头像。原理就是在头像上覆盖一张透明的图片,把四个角颜色设置成页面的背景颜色,中间透明。

第二种:在你上传头像的时候程序自动裁剪成圆的,保留原图片和新裁剪的图片就ok了。

希望能帮助到你...

php怎么输出背景透明的图片?

php可以使用GD库或者ImageMagick工具生成png或者gif的背景透明图片.推荐使用ImageMagick.

这里有范例

准备一张png图片,放到php文件的目录,运行看看效果.

<?php

/* Read the image */

$im = new Imagick("test.png");

/* Thumbnail the image */

$im->thumbnailImage(200, null);

/* Create a border for the image */

$im->borderImage(new ImagickPixel("white"), 5, 5);

/* Clone the image and flip it */

$reflection = $im->clone();

$reflection->flipImage();

/* Create gradient. It will be overlayed on the reflection */

$gradient = new Imagick();

/* Gradient needs to be large enough for the image and the borders */

$gradient->newPseudoImage($reflection->getImageWidth() + 10, $reflection->getImageHeight() + 10, "gradient:transparent-black");

/* Composite the gradient on the reflection */

$reflection->compositeImage($gradient, imagick::COMPOSITE_OVER, 0, 0);

/* Add some opacity. Requires ImageMagick 6.2.9 or later */

$reflection->setImageOpacity( 0.3 );

/* Create an empty canvas */

$canvas = new Imagick();

/* Canvas needs to be large enough to hold the both images */

$width = $im->getImageWidth() + 40;

$height = ($im->getImageHeight() * 2) + 30;

$canvas->newImage($width, $height, new ImagickPixel("black"));

$canvas->setImageFormat("png");

/* Composite the original image and the reflection on the canvas */

$canvas->compositeImage($im, imagick::COMPOSITE_OVER, 20, 10);

$canvas->compositeImage($reflection, imagick::COMPOSITE_OVER, 20, $im->getImageHeight() + 10);

/* Output the image*/

header("Content-Type: image/png");

echo $canvas;

?>

关于php圆角透明的介绍到此就结束了,不知道本篇文章是否对您有帮助呢?如果你还想了解更多此类信息,记得收藏关注本站,我们会不定期更新哦。

查看更多关于php圆角透明 css透明空心圆的详细内容...

声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did210367
更新时间:2023-05-03   阅读:31次

上一篇: php识别数字 php获取字符串中的数字

下一篇:php如何实现网站 php建立网站

相关资讯

最新资料更新

  • 1.php7性能tu Php性能
  • 2.php提取数组转map php 数组转xml
  • 3.php环境配置工具 phpstorm2021配置php环境
  • 4.php开发宝典 php7开发宝典pdf下载
  • 5.接口的继承php 接口的继承和实现
  • 6.口袋源码php下载 口袋com
  • 7.php判断08数字 php 判断数字
  • 8.手机文件php怎么打开 手机php格式文件怎么打开
  • 9.phpsmtp配置项 php 配置
  • 10.php客户信息管理 php用户管理
  • 11.php在线运行测试 php 测试工具
  • 12.phpajax日历 php如何生成一年的日历
  • 13.php调用裁剪插件 phpcrawl
  • 14.php课堂系统 php网课系统
  • 15.php变下载文件 php 下载文件
  • 16.php延迟0.1 php延迟执行不影响页面展示
  • 17.php声明字符串 在php中声明变量应使用什么符号
  • 18.php的如何使用数组if php中数组
  • 19.php换文字颜色 php文字颜色代码
  • 20.php包含eaplay吗 php是否包含

CopyRight:2016-2025好得很程序员自学网 备案ICP:湘ICP备09009000号-16 http://haodehen.cn
本站资讯不构成任何建议,仅限于个人分享,参考须谨慎!
本网站对有关资料所引致的错误、不确或遗漏,概不负任何法律责任。
本网站刊载的所有内容(包括但不仅限文字、图片、LOGO、音频、视频、软件、程序等)版权归原作者所有。任何单位或个人认为本网站中的内容可能涉嫌侵犯其知识产权或存在不实内容时,请及时通知本站,予以删除。

网站内容来源于网络分享,如有侵权发邮箱到:kenbest@126.com,收到邮件我们会即时下线处理。
网站框架支持:HDHCMS   51LA统计 百度统计
Copyright © 2018-2025 「好得很程序员自学网」
[ SiteMap ]