background preloader

HTML5 Video

HTML5 Video
Introduction In modern browsers, adding a video to your page is as easy as adding an image. No longer do you need to deal with special plug-ins or require crazy markup, you can do it with a single element. The Markup Let's jump in with a really simple example: That's all you need to embed a simple video on your page and show the basic controls so that a user can play, pause or otherwise control the video. Specifying Sources You can specify multiple source files by using the <source> element. When the browser parses the <source> tag, it uses the optional type attribute to help decide which file to download and play. It's also a good idea to make sure that your videos are being served with the right MIME type. Media Fragments Adding a media fragment to the media URL, you can specify the exact portion you want to play. You can also specify the times in hours:minutes:seconds, such as #t=00:01:05 to start the video at one minute, five seconds in. Providing captions and subtitles Attributes Styling

Кнопки в стиле сайта YouTube » Скрипт.я1.ру Кнопки в стиле сайта YouTube Последняя вариация дизайна сайта YouTube имеет интересный вид кнопок (большей частью они расположены в нижнем колонтитуле), которые в обычном состоянии имеют еле различимую рамочку, но при наведении курсора мыши на них как бы "всплывают", побуждая посетителя нажать их. Такой дизайн кнопок очень выразителен и отлично работает. 1) Состояние по умолчанию не бросается в глаза посетителя, соревнуясь за его внимание с другими достойными элементами интерфейса. 2) Посетитель все равно получает призыв нажать их, когда становится необходимо. 3) Они выражают другой функционал, в отличие от ссылок, расположенных рядом (нажатие на них не приводит к переходу на другую страницу). Такие кнопки открывают выпадающие панели для выбора установок.. Разметка для кнопок вполне обычная: Кнопка #1 А стили нужно установить для всех трех состояний: . button { border : 1px solid #DDD; border - radius : 3px ; text - shadow : 0 1px 1px white ; - webkit - box - shadow : 0 1px 1px #fff;

Quick Guide to Implementing the HTML5 Audio Tag Step 1: Wrap your Flash object with the audio tag Those browsers that don't recognize the audio tag will load the Flash content instead. Step 2: Add the source reference We can add as many "source" lines and formats as we want. If the browser doesn't support one specific format it will fallback to the next one and so forth. Step 3: Add fallback to Flash To be safe, we need to add the fallback to a Flash audio player, in case the browser doesn't support any of the formats we specified. Note: There are also tools and online converters you can use if you want to create ogg files from your mp3 and add support for ogg too. To make it easier, we are using the SWFObject library to insert the Flash player via JavaScript. <script src=" "2.2");</script> Step 4: Add the default controls to show the player These controls are not customizable (see examples at the end). Examples You are all set!

Offline": What does it mean and why should I care? Introduction: The Meaning of "Offline" "Web" and "online" are two closely associated terms, downright synonymous to many people. So why on earth would we talk about "offline" web technologies, and what does the term even mean? At one level, we can talk about completely offline web apps, those unusual creatures that run inside a browser, but never see the light of the internet. Typically, they will run on a URI, pointing to a hard drive, USB key, or DVD (if you remember those). However, it gets more nuanced than "always-offline". There are also online-offline applications which intentionally keep certain information locally. Online-offline applications comes at the cost of increased complexity, and you ought to consider whether offline support is justified. Even assuming internet utopia, where everything is always online, offline technologies still server a purpose. As well as quick startup, offline can be used in a transient way too. Application Cache and Offline Storage Cookies

Free Map Tools Резиновая верстка по высоте DIV - Блог Кировского строителя Интернет Многие неопытные веб-мастера сталкиваются с проблемой, когда верстают резиновый макет. Как правило, если макет тянется, то тянется он и по высоте, но тут возникает трудность. Трудность заключается в том, чтобы «прилепить» подвал (footer) внизу макета. С табличной версткой не у кого не возникает проблем, а вот с модной дивной люди ломают голову. Итак, что мы имеем. Макет, состоящий из двух основных частей, область контента и подвал. Задача ясна, начинаем верстать. Первая строка объявляет браузеру, какой спецификации придерживаться при формировании документа. Четвертая в принципе не нужна, она указывает браузеру Internet Explorer 8 отображать содержимое документа как в 7 версии, практика показывает некие отклонения 8 от 7 при более масштабной верстке. Пятая объявляет браузеру выбранную нами кодировку, в данном случае используем UTF-8. Девятая строка подключает файл с нашими стилями. Двенадцатая и четырнадцатая начало и конец нашей области контента. Пятнадцатая область подвала.

Introduction to CSS3 Animations <title>Introduction to CSS3 Animations</title> pre { white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; clear:both; ul.css3demo li { -webkit-border-radius: 15px; display: block; float: left; width: 50px; height: 50px; margin: 10px; background: #000; color: #fff; text-indent: -5000em; cursor: pointer; ul.css3demo1 li { -webkit-transition: all 0.3s linear; ul.css3demo1 li:hover { -webkit-transform: rotate3d(0, 0, 0, 25deg); -webkit-transform-style: preserve-3d; ul.css3demo2 li { ul.css3demo2 li:hover { -webkit-transform: translate3d(0, 40px, 0); ul.css3demo3 li { ul.css3demo3 li:hover { -webkit-transform: scale(.5); ul.css3demo4 li { ul.css3demo4 li:hover { -webkit-transform: scale(1.5); ul.css3demo5 li { ul.css3demo5 li:hover { -webkit-transform: translate3d(10px, 0, 0); ul.css3demo6 li { ul.css3demo6 li:hover { -webkit-box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.5); ul.css3demo7 li { ul.css3demo7 li:hover { background: #0cf; ul.css3demo8 li { ul.css3demo9 li {

Exponenciación binaria La exponenciación binaria es un algoritmo utilizado para calcular de forma rápida grandes potencias enteras de un número dado. También es conocido como potenciación por cuadrados o elevar al cuadrado y multiplicar. Versión recurrente[editar] Fundamentos[editar] El algoritmo está basado en las siguientes tres propiedades de la potencia: Usando y en la ecuación (2) se sigue que . en la ecuación (3) se obtiene que Algoritmo[editar] El siguiente algoritmo recursivo calcula para un natural dado: Comparado con el método original de multiplicar por sí mismo veces, este algoritmo sólo utiliza O(log n) multiplicaciones y acelera el cálculo de tremendamente; más o menos de la misma forma que el algoritmo de la multiplicación acelera una multiplicación sobre el método más lento de realizar una suma repetida. Aplicaciones[editar] La idea puede ser usada también para computar potencias de números enteros en un semigrupo, usando la regla Potencia(x, -n) = (Potencia(x, n))-1. Por ejemplo, la evaluación de x13 = x1101bin

Lesson: Object-Oriented Programming Concepts (The Java™ Tutorials > Learning the Java Language) If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language. What Is an Object? An object is a software bundle of related state and behavior. What Is a Class? A class is a blueprint or prototype from which objects are created. What Is Inheritance? Inheritance provides a powerful and natural mechanism for organizing and structuring your software. What Is an Interface? An interface is a contract between a class and the outside world. What Is a Package? A package is a namespace for organizing classes and interfaces in a logical manner. Questions and Exercises: Object-Oriented Programming Concepts

Related: