HTML5
Web Development to the next level
*Including other next generation technologies of the Web Development stack
http://slides.html5rocks.com/#slide1Source : http://slides.html5rocks.com
ShYaM D Man U Love...
<script type="text/javascript" src="jquery-1.4.2.min.js">script>
<script type="text/javascript">
$(document).ready(function(){
$(".rounded-img, .rounded-img2").load(function() {
$(this).wrap(function(){
return '<span class="' + $(this).attr('class') +
'" style="background:url(' + $(this).attr('src') + ')
no-repeat center center; width: ' + $(this).width() +
'px; height: ' + $(this).height() + 'px;" />';
});
$(this).css("opacity","0");
});
});
script>
Source:http://www.webdesignerwall.com/tutorials/css3-rounded-image-with-jquery/
3D CSS |
The CSS code to style the basic elements (container, bubble and rectangle) is the following.3D CSS Ribbon
I Have Used Only CSS, friends!
For this tutorial I have used some new properties of the CSS3. You can realize a nice 3D effect using only CSS, it's really fantastic.
It doesn't work with IE!
/* Reset */ html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, font, img, ul, li { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } body { line-height: 1; } ol, ul { list-style: none; } :focus { outline: 0; } /* // Reset */ body { background: url(bck.jpg); /* image for body made with Photoshop using noise filter (gaussian monochromatic) on #ccc */ font-family: Georgia, Verdana, “Lucida Sans Unicode”, sans-serif; font-size: 12px; color: #999; } h2 { font-style: italic; font-weight: normal; line-height: 1.2em; } div#container { margin: 50px auto 0px auto; /* centered */ width: 400px; } .bubble { clear: both; margin: 0px auto; width: 350px; background: #fff; -moz-border-radius: 10px; -khtml-border-radius: 10px; -webkit-border-radius: 10px; -moz-box-shadow: 0px 0px 8px rgba(0,0,0,0.3); -khtml-box-shadow: 0px 0px 8px rgba(0,0,0,0.3); -webkit-box-shadow: 0px 0px 8px rgba(0,0,0,0.3); position: relative; z-index: 90; /* the stack order: displayed under ribbon rectangle (100) */ } .rectangle { background: #7f9db9; height: 50px; width: 380px; position: relative; left:-15px; top: 30px; float: left; -moz-box-shadow: 0px 0px 4px rgba(0,0,0,0.55); -khtml-box-shadow: 0px 0px 4px rgba(0,0,0,0.55); -webkit-box-shadow: 0px 0px 4px rgba(0,0,0,0.55); z-index: 100; /* the stack order: foreground */ } .rectangle h2 { font-size: 30px; color: #fff; padding-top: 6px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2); text-align: center; }Below the result of these statements.
We add the two classes to make and place the triangles in style.css… and the style for the content (class info).3D CSS Ribbon
I Have Used Only CSS, friends!
For this tutorial I have used some new properties of the CSS3. You can realize a nice 3D effect using only CSS, it's really fantastic.
It doesn't work with IE!
Go to the tutorial!
.triangle-l { border-color: transparent #7d90a3 transparent transparent; border-style:solid; border-width:15px; height:0px; width:0px; position: relative; left: -30px; top: 65px; z-index: -1; /* displayed under bubble */ } .triangle-r { border-color: transparent transparent transparent #7d90a3; border-style:solid; border-width:15px; height:0px; width:0px; position: relative; left: 350px; top: 35px; z-index: -1; /* displayed under bubble */ } .info { padding: 60px 25px 35px 25px; } .info h2 { font-size: 20px; } .info p { padding-top: 10px; font-size: 14px; line-height: 22px; } .info p a { color: #c4591e; text-decoration: none; } .info p a:hover { text-decoration: underline; }Here the result.
The style for our top-menu.3D CSS Ribbon
I Have Used Only CSS, friends!
For this tutorial I have used some new properties of the CSS3. You can realize a nice 3D effect using only CSS, it's really fantastic.
It doesn't work with IE!
Go to the tutorial!
.menu { position: relative; top:3px; left: 50px; z-index: 80; /* the stack order: displayed under bubble (90) */ } .menu ul li { -webkit-transform: rotate(-45deg); /* rotate the list item */ -moz-transform: rotate(-45deg); /* rotate the list item */ width: 50px; overflow: hidden; margin: 10px 0px; padding: 5px 5px 5px 18px; float: left; background: #7f9db9; text-align: right; } .menu ul li a { color: #fff; text-decoration: none; display:block; } .menu ul li.l1 { background: rgba(131,178,51,0.65); } .menu ul li.l1:hover { background: rgb(131,178,51); } .menu ul li.l2 { background: rgba(196,89,30,0.65); } .menu ul li.l2:hover { background: rgb(196,89,30); } .menu ul li.l3 { background: rgba(65,117,160,0.65); } .menu ul li.l3:hover { background: rgb(65,117,160); } .menu span { margin: 15px 80px 0px 0px; float:right; }Here you can se the simple menu.
div
s into the new elements. The only difficulty I had was deciding which element to use to mark up my sidebar, as it also includes a search field and site information as well as site-wide navigation.video
and audio
elements. contenteditable
attribute. draggable
attribute. HTMLDocument
interface from DOM Level 2 HTML in a number of ways. The interface is now implemented on all objects implementing the Document
interface so it stays meaningful in a compound document context. It also has several noteworthy new members: getElementsByClassName()
to select elements by their class name. The way this method is defined will allow it to work for any content with class
attributes and a Document
object such as SVG and MathML. innerHTML
as an easy way to parse and serialize an HTML or XML document. This attribute was previously only available on HTMLElement
in Web browsers and not part of any standard. activeElement
and hasFocus
to determine which element is currently focused and whether the Document
has focus respectively. getSelection()
which returns an object that represents the current selection(s).HTMLElement
HTMLElement
interface has also gained several extensions in HTML5: getElementsByClassName()
which is basically a scoped version of the one found on HTMLDocument
. innerHTML
as found in Web browsers today. It is also defined to work in XML context (when it is used in an XML document). classList
is a convenient accessor for className
. The object it returns, exposes methods (contains()
, add()
, remove()
, and toggle()
) for manipulating the element's classes. The a
, area
and link
elements have a similar attribute called relList
that provides the same functionality for the rel
attribute.section
represents a generic document or application section. It can be used together with the h1
, h2
, h3
, h4
, h5
, and h6
elements to indicate the document structure. article
represents an independent piece of content of a document, such as a blog entry or newspaper article. aside
represents a piece of content that is only slightly related to the rest of the page. hgroup
represents the header of a section. header
represents a group of introductory or navigational aids. footer
represents a footer for a section and can contain information about the author, copyright information, et cetera. nav
represents a section of the document intended for navigation.figure
represents a piece of self-contained flow content, typically referenced as a single unit from the main flow of the document.
figcaption
can be used as caption (it is optional).video
and audio
for multimedia content. Both provide an API so application authors can script their own user interface, but there is also a way to trigger a user interface provided by the user agent. source
elements are used together with these elements if there are multiple streams available of different types. embed
is used for plugin content. mark
represents represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. progress
represents a completion of a task, such as downloading or when performing a series of expensive operations. meter
represents a measurement, such as disk usage. time
represents a date and/or time. ruby
, rt
and rp
allow for marking up ruby annotations. wbr
represents a line break opportunity. canvas
is used for rendering dynamic bitmap graphics on the fly, such as graphs or games. command
represents a command the user can invoke. details
represents additional information or controls which the user can obtain on demand. The summary
element provides its summary, legend, or caption. datalist
together with the a new list
attribute for input
can be used to make comboboxes:
keygen
represents control for key pair generation. output
represents some type of output, such as from a calculation done through scripting. input
element's type
attribute now has the following new values:
and is case-insensitive in the HTML syntax. DOCTYPEs from earlier versions of HTML were longer because the HTML language was SGML-based and therefore required a reference to a DTD. With HTML5 this is no longer the case and the DOCTYPE is only needed to enable standards mode for documents written using the HTML syntax. (function($){
$(function(){
var message = "This site does not support Internet Explorer 6. Please consider downloading a newer browser.",
div = $('
').html(message).css({
'height': '50px',
'line-height': '50px',
'background-color':'#f9db17',
'text-align':'center',
'font-family':'Arial, Helvetica, sans-serif',
'font-size':'12pt',
'font-weight':'bold',
'color':'black'
}).hide().find('a').css({color:'#333'}).end();
div.prependTo(document.body).slideDown(500);
});
})(jQuery);