Skip to content

Instantly share code, notes, and snippets.

View AitorAlejandro's full-sized avatar

Aitor Alejandro Herrera AitorAlejandro

View GitHub Profile
@AitorAlejandro
AitorAlejandro / html5_video_fallback.html
Created April 16, 2015 22:09
HTML5 Video con Flash Fallback
<!-- first try HTML5 playback: if serving as XML, expand `controls` to `controls="controls"` and autoplay likewise -->
<!-- warning: playback does not work on iOS3 if you include the poster attribute! fixed in iOS4.0 -->
<video width="640" height="360" controls>
<!-- MP4 must be first for iPad! -->
<source src="__VIDEO__.MP4" type="video/mp4" /><!-- Safari / iOS video -->
<source src="__VIDEO__.OGV" type="video/ogg" /><!-- Firefox / Opera / Chrome10 -->
<!-- fallback to Flash: -->
<object width="640" height="360" type="application/x-shockwave-flash" data="__FLASH__.SWF">
<!-- Firefox uses the `data` attribute above, IE/Safari uses the param below -->
<param name="movie" value="__FLASH__.SWF" />
@AitorAlejandro
AitorAlejandro / cosido.css
Created April 16, 2015 22:11
Stitched - Efecto de parche cosido
.stitched {
padding: 20px;
margin: 10px;
background: #ff0030;
color: #fff;
font-size: 21px;
font-weight: bold;
line-height: 1.3em;
border: 2px dashed #fff;
border-radius: 10px;
@AitorAlejandro
AitorAlejandro / mediatypescss.txt
Last active August 29, 2015 14:19
Los media types para CSS
all Used for all media type devices
aural Used for speech and sound synthesizers
braille Used for braille tactile feedback devices
embossed Used for paged braille printers
handheld Used for small or handheld devices
print Used for printers
projection Used for projected presentations, like slides
screen Used for computer screens
tty Used for media using a fixed-pitch character grid, like teletypes and terminals
tv Used for television-type devices
/*Hay que asegurarse de si text-shadow está soportado, si no, el texto no se verá*/
.blur {
color: transparent;
text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
@AitorAlejandro
AitorAlejandro / loadInParent.js
Created April 21, 2015 14:13
Cargar una URL en la página padre u opener y auto cerrarse
function loadInParent(url) {
var opener = window.opener;
if (!opener.closed) {
opener.location.href = url;
} else {
window.open(url);
}
window.self.close();
}
@AitorAlejandro
AitorAlejandro / colorTextoSeleccionado.css
Last active August 29, 2015 14:19
Cambiar el color de selección del texto
::-moz-selection {
background-color: #FFA;
color: #000;
}
::selection {
background-color: #FFA;
color: #000;
}
.wrapper {
margin: 50px auto;
width: 280px;
height: 370px;
background: white;
border-radius: 10px;
-webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
-moz-box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
box-shadow: 0px 0px 8px rgba(0,0,0,0.3);
position: relative;
@AitorAlejandro
AitorAlejandro / crossbrowseropacity.css
Created April 21, 2015 20:26
Cross Browser Opacity
.opacidad_media {
/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
/* IE 5-7 */
filter: alpha(opacity=50);
/* Netscape */
-moz-opacity: 0.5;
opacity: 0.5;
}
@AitorAlejandro
AitorAlejandro / crossbrowserminheight.css
Created April 21, 2015 20:29
Cross Browser min-height
.minHeight {
min-height: 500px;
height:auto !important;
height: 500px;
}
@AitorAlejandro
AitorAlejandro / cssboxshadow.css
Last active August 29, 2015 14:19
CSS Box Shadow
/* sombra exterior */
.shadow {
-moz-box-shadow: 3px 3px 5px 6px #ccc;
-webkit-box-shadow: 3px 3px 5px 6px #ccc;
box-shadow: 3px 3px 5px 6px #ccc;
}
/* sombra interior */
.inner-shadow {
-moz-box-shadow: inset 0 0 10px #ccc;
-webkit-box-shadow: inset 0 0 10px #ccc;