IMPORTANT!

Snipt is going open source. We've toyed with this idea for quite a while, and have finally decided it's the right way to move forward.

A few things:
  • The entire Snipt source code will be released on GitHub under the 3-clause BSD License on Friday, September 10th.
  • While we'd like to think we're perfect, we realize we're only human. By open sourcing the software that runs this website, certain bugs or security flaws may be discovered that could compromise the privacy of your snipts.
  • Only the Lion Burger team will be able to push commits to the Snipt.net site. Contributors should send a pull request to add new features or submit patches.
  • By using this site, you agree not to be too angry or take any legal action against Lion Burger should this whole thing go up in flames some day.
  • Follow us on Twitter for updates.
I agree, close this message
Sign up to create your own snipts, or login.

Latest 100 public snipts » transparent The latest public transparent snipts.

showing 1-6 of 6 snipts for transparent
  • Transparent DIV
    .transparent_class {
    	filter:alpha(opacity=50);
    	-moz-opacity:0.5;
    	-khtml-opacity: 0.5;
    	opacity: 0.5;
    }
    

    copy | embed

    0 comments - tagged in  posted by actionbasic on Feb 14, 2010 at 8:11 p.m. EST
  • RGB CSS Opacity
    h1 {
    background: transparent url(black50.png);
    background: rgba(0, 0, 0, 0.5) none;
    }
    
    div {
    color: rgb(0, 0, 0);
    background-color: rgb(255, 255, 255);
    border: 10px solid rgba(255, 255, 255, 0.3);
    }
    

    copy | embed

    0 comments - tagged in  posted by curosio on Dec 01, 2009 at 5:25 a.m. EST
  • PNG transparent 1x1px generator
    <?php
    /*****************************************************************
     * Script for automatic generation of one pixel
     * alpha-transparent images for non-RGBA browsers.
     * @author Lea Verou
     * @version 1.0 beta
     * Licensed under a MIT license
     *****************************************************************/
    
    ######## SETTINGS ##############################################################
    
    /**
     * Enter the directory in which to store cached color images.
     * This should be relative and SHOULD contain a trailing slash.
     * The directory you specify should exist and be writeable (CHMOD 666 or 777).
     * If you want to store the pngs at the same directory, leave blank ('').
     */
    define('COLORDIR', 'rgba/');
    
    
    /**
     * If you requently use a color with varying alphas, you can name it
     * below, to save you some typing and make your CSS easier to read.
     */
    $color_names = array(
    	'white' => array(255,255,255),
    	'black' => array(0,0,0)
    	// , 'mycolor' => array(red value, green value, blue value)
    );
    
    
    /**
     * If you don't want the generated pngs to be stored in the server, set the following to
     * false. This is STRONGLY NOT RECOMMENDED. It's here only for testing/debugging purposes.
     */
    define('CACHEPNGS', true);
    
    
    
    ######## NO FURTHER EDITING, UNLESS YOU REALLY KNOW WHAT YOU'RE DOING ##########
    
    $dir = substr(COLORDIR,0,strlen(COLORDIR)-1);
    if(!is_writable($dir))
    {
    	die("The directory '$dir' either doesn't exist or isn't writable.");
    }
    
    $rgb = $color_names[$_GET['name']];
    
    $red	= is_array($rgb)? $rgb[0] : intval($_GET['r']);
    $green	= is_array($rgb)? $rgb[1] : intval($_GET['g']);
    $blue	= is_array($rgb)? $rgb[2] : intval($_GET['b']);
    $alphaurl = $_GET['a'];
    
    // "A value between 0 and 127. 0 indicates completely opaque while 127 indicates completely transparent."
    // http://www.php.net/manual/en/function.imagecolorallocatealpha.php
    $alpha = intval(127 - 127 * ($alphaurl / 100));
    
    // Does it already exist?
    $filepath = COLORDIR . "r{$red}_g{$green}_b{$blue}_a{$alphaurl}.png";
    
    if(/*CACHEPNGS and */file_exists($filepath))
    {
    $url = "http://{$_SERVER['HTTP_HOST']}/{$filepath}";
    header("Status: 301");
    die(header("Location: {$url}"));
    }
    else
    {
    	// Send headers
    header('Content-Type: image/png');
    header("Expires: ".gmdate("D, d M Y H:i:s", strtotime('+5 years'))." GMT"); 
    
    
    	$img = @imagecreatetruecolor(1,1) or die('Cannot Initialize new GD image stream');
    	
    	// This is to allow the final image to have actual transparency
    	// http://www.php.net/manual/en/function.imagesavealpha.php
    	imagealphablending($img, false);
    	imagesavealpha($img, true);
    	
    	// Allocate our requested color
    	$color = imagecolorallocatealpha($img, $red, $green, $blue, $alpha);
    	
    	// Fill the image with it
    	imagefill($img,0,0,$color);
    
        // Save the file
    	imagepng($img,$filepath,0,NULL);
    	
    	// Serve the file
    	imagepng($img);
    	flush();
    	
    	// Free up memory
    	imagedestroy($img);
    }
    ?>
    

    copy | embed

    0 comments - tagged in  posted by aidilfbk on May 25, 2009 at 7:49 a.m. EDT
  • Transparent css *all browsers
    .transparent {
    	filter:alpha(opacity=50);
    	-moz-opacity:0.5;
    	-khtml-opacity: 0.5;
    	opacity: 0.5;
    }
    

    copy | embed

    0 comments - tagged in  posted by dani on Jan 25, 2009 at 9:37 a.m. EST
  • Semi-Transparent PNG on IE By Fabrizio Calderan
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="it" xml:lang="it">
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <title>Test Background PNG24</title>
            
            <style type="text/css">
            body {
                background          : url(immagine-test.jpg) top left no-repeat; 
                color               : #fff;
            }
            
            
            
            .overlay { 
                background-image	: url(bg30.png); 
                width               : 300px;
                height              : 200px;
            }
            </style>
    
            <!--[if lte IE 6]>
                <style type="text/css">
                .overlay {
                    background-image	: url(bg100.gif);
                    filter				: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="bg30.png", sizingMethod="scale");
                }
            </style>
            <![endif]--> 
            
                
            
        </head>
    
    <body>
    
        <div class="overlay">
        Prova testo su sfondo trasparente al 30%
        </div>
    
    </body>
    </html>
    

    copy | embed

    0 comments - tagged in  posted by azote on Jan 16, 2009 at 9:00 a.m. EST
  • transparent css all browsers
    .transparent {
    	filter:alpha(opacity=50);
    	-moz-opacity:0.5;
    	-khtml-opacity: 0.5;
    	opacity: 0.5;
    }
    
    new:
    
    .transparent {
        filter: alpha(opacity=50); /* internet explorer */
        -khtml-opacity: 0.5;      /* khtml, version anterior de safari */
        -moz-opacity: 0.5;       /* firefox, mozilla, netscape */
        opacity: 0.5;           /* safari, chrome, opera */
        -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; /*internet explorer 8 - gracias Andres */
        }
    

    copy | embed

    2 comments - tagged in  posted by curosio on Dec 30, 2008 at 8:11 a.m. EST
Sign up to create your own snipts, or login.