The benefits of multiple class HTML element definitions came to the fore when we presented CSS3 Button Animation Transition Game Sharing Tutorial and today we find a β¦
- slideshow β¦ meets β¦
- animated GIF
β¦ βpresentationβ way as our theme for todayβs βweb applicationβ.
Unlike some other βslideshowβ methods we navigate nowhere, but more, βslapβ overlay upon overlay onto the one image area, and weβre officially adding it to our list of image presentation ideas you can see listed from PDF on Mac OS X via Images and Finder and Preview Tutorial as shown below.
From above, as you might surmise, and see for yourself trying slideshow_multiple_classhtmlβs live
run link, what you can end up with are the makings of an animated GIF, effectively created just for your session, though on this side of the thinking we may make improvements as time goes on.
How does it work? Well, the user defines up to nine β¦
- image URL β¦ and/or β¦
- HTML URL containing img element src= properties pointing to image URL(s)
β¦ all able to contribute to the contents of the resultant βslideshowβ (like animated GIF) presentation.
Weβll leave you with some reruns of past slideshows weβve presented β¦
- Yii MVC PHP Framework Hello World Content Tutorial
- Android Camera to Mac iPhoto Primer Tutorial
- NetBeans Backbone.js HTML5 Web Application Primer Tutorial
Previous relevant CSS3 Button Animation Transition Game Sharing Tutorial is shown below.
There are some familiar βitemsβ with todayβs additional functionality to yesterdayβs CSS3 Button Animation Transition Game Tutorial β¦ and some other matters we encourage you to consider, the primary one of these being β¦
- the benefits of multiple class HTML element definitions where the Cascading in CSS comes into (its hierarchical) play with first class being a βtemplateβ one refined by second class βlocalizingβ styles β¦ we instigated before familiar β¦
- localization of our Animated Button Game allowing the user to define their own βPhrase or Proverbβ versus βExplanation of phrase or proverbβ relationship β¦ and our favourite β¦
- sharing email (via client email a link to mailto: href element) mechanism for β¦
- email link to game β¦ and/or β¦
- email link to game with any localizations and as a challenge to an emailee (with the same order of questioning) and a β versus otherscore/othergoesβ flagging of score HTML element
- interfacing to the user via new βcharacterβ and emoji and βemoji plus sup buttonβ (as a new means by which we can effect a multiple emoji βfeelβ)
The (new version of the) gameβs HTML and CSS and Javascript animated_button_gamehtm changed thisway for this work today, the biggest block of change representing how that CSS started using multiple class definitions like β¦
class="button button1"
β¦ and reduced the CSS definition from right hand side to left hand side as below β¦
New multiple class CSS | Old single class use CSS |
---|---|
<style> select { width:70%; border: 2px solid pink; } .button { .button span { .button span:after { .button:hover span { .button:hover span:after { .button1 { .button1 span:after { .button2 { .button2 span:after { .button3 { .button3 span:after { .button4 { .button4 span:after { .button5 { .button5 span:after { .button6 { .button6 span:after { .button7 { .button7 span:after { .button8 { .button8 span:after { |
<style> select { width:70%; border: 2px solid pink; } .button1 { .button1 span { .button1 span:after { .button1:hover span { .button1:hover span:after { .button2 { .button2 span { .button2 span:after { .button2:hover span { .button2:hover span:after { .button3 { .button3 span { .button3 span:after { .button3:hover span { .button3:hover span:after { .button4 { .button4 span { .button4 span:after { .button4:hover span { .button4:hover span:after { .button5 { .button5 span { .button5 span:after { .button5:hover span { .button5:hover span:after { .button6 { .button6 span { .button6 span:after { .button6:hover span { .button6:hover span:after { .button7 { .button7 span { .button7 span:after { .button7:hover span { .button7:hover span:after { .button8 { .button8 span { .button8 span:after { .button8:hover span { .button8:hover span:after { |
Cute, huh?!
Previous relevant CSS3 Button Animation Transition Game Tutorial is shown below.
The recent CSS3 Transition Game Tutorial had us examining CSS3 (Cascading Style Sheet) specification βTransitionsβ as tools for animation styling. Today we β¦
- apply such βtransitionβ thinking to the animation of HTML button elements (as inspired by https://www.w3schools.com/css/tryit.asp?filename=trycss_buttons_animate1 thanks) β¦ in terms of β¦
- creating a game whereby the user links a (most often based on Wikipedia sources, thanks) βproverb or phrase explanationβ the game randomly selects for the user in an HTML select element dropdown (made to be βreadonlyβ via the use of the disabled=βdisabledβ attribute) β¦ to β¦
- HTML button elements initially showing a prefix β¦ that when β¦
- hovered over CSS3 βtransitionβ animation also channelling the checked against the :after selector to show a full proverb or phrase as the user selection β¦
- Javascript checked against data attributed (to hide from βnosyβ users) the link to βexplanationβ correct matches to β¦
- increase the userβs score in the gameβs HTML and CSS and Javascript animated_button_game
html
Do you remember a recent βStop Pressβ explaining a neat way to get mobile platforms to effectively map their onclick event logic to an onmouseover event based Javascript logic set, via the application of β¦
onclick=""
β¦ HTML element (today that being a button element) logic? Well, today that is used again to allow for this game to be played on mobile devices, but just with those users clicking buttons rather than the βhoverβ that a non-mobile user does to play the same game.
Previous relevant CSS3 Transition Game Tutorial is shown below.
Yesterdayβs CSS3 Transition Primer Tutorial started us thinking about CSS3 (Cascading Style Sheet) specification βTransitionsβ, and there, we intimated that they could be used to serve up to the web application user simple animation functionality. Today, we go a bit further down that road exporing a few more ideas in this line of work, along the way using βtransitionsβ in a simple spider game as below β¦
Added into the βtransitionsβ usage, building on yesterday, are the concepts (all available to read further on here, thanks) β¦
- multiple βconceptβ transitions
- transition-timing-function modes of use
- transition (CSS styling) definition separated out into its 3 constituent parts β¦
- transition-property
- transition-delay
- transition-duration
β¦ as per β¦
<style>
.cdiv {
width: 300px;
height: 200px;
background: red;
-webkit-transition-delay: 3s;
transition-delay: 3s;
-webkit-transition-property: height, width; /* Safari */
transition-property: height, width;
-webkit-transition-duration: 4s, 22s; /* Safari */
transition-duration: 4s, 22s;
}
.cdiv:hover {
width: 600px;
height: 400px;
}
</style>
The game today recalls the recent CSS3 Background Size Contain and Cover Primer Tutorial use of the CSS background-size contain and cover attribute values that we harness to (lamely, admittedly) make (just one of our) spiders rear up, and mildly scare our web application game users (perhaps a few of which are rolling on the floor in apopleptic laughter).
The HTML and CSS and Javascript liverunβs css3_transitions
htm HTML and CSS and Javascript source code, changed thisway.
Previous relevant CSS3 Transition Primer Tutorial is shown below.
The CSS3 (Cascading Style Sheet) specification introduced βTransitionsβ to CSS styling of web pages. A CSS3 βtransitionβ β¦
CSS3 transitions allows you to change property values smoothly (from one value to another), over a given duration.
Today, we use the CSS :hover selector as the basis for transitions in our liverunβs css3_transitions
html HTML and CSS source code.
As you might surmise using this web application, CSS3 βTransitionsβ can act like simple animations.
Stop Press
The CSS :hover selector is not a βgood fitβ (euphemism for βit doesnβt work, Bud!β) on mobile platforms. Looking around the βnetβ got to this great link, thanks, which suggested adding onlick=ββ on all relevant :hover selector HTML elements, to allow for (and it only really makes sense when the real onclick event meaning is not needed) the onclick event to be simulating the onmouseover event, for those mobile platforms missing the real onmouseover event.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.
If this was interesting you may be interested in this too.