FaceScroll Custom scrollbar - okienko z przewijaną treścią
FaceScroll - jest to nazwa tego skryptu. A w skrócie jest to okienko o nadanych wymiarach z treścią tekstową, która może być również wzbogacona obrazkami itp. elementami. Podstawową różnicą, która sprawia że jest to odrębny i wyróżniający się styl tworzenia okienek na stronie, jest jego niepowtarzalny i bardzo estetycznie wyglądający styl. Charakteryzuje się estetyką wyglądu i funkcją przewijania okna, przy czym sam wskaznik przewijania okna jest ukryty i pojawia się dopiero w momencie najechania na okno i treść myszką. Pasek przewijania reaguje również na scrola myszki (kółko myszy do przewijania) .
Scrollbar (default style) shows onMouseover
Scrollbar (alternate style), always shown
- Remove facescroll scrollbar
- Add facescroll scrollbar
Oto zawartość sekcji HEAD:
<link href="/general.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script type="text/javascript" src="/facescroll.js"> <script type="text/javascript"> |
Oraz pliki do umieszczenia w folderze strony:
facescroll.js
jquery.ui.touch-punch.min.js
general.css
custom-scroll-bar.png
Wywołanie w pliku w sekcji BODY:
<p><b>Scrollbar (default style) shows onMouseover</b></p> <div id="demo1" style="width:300px; height:250px; padding:8px; background:lightyellow; border:1px solid gray; resize:both; overflow:scroll"> From Wikipedia- Gunpowder, also known since in the late 19th century as black powder, was the first chemical explosive and the only one known until the mid 1800s.[2] It is a mixture of sulfur, charcoal, and potassium nitrate (saltpeter) - with the sulfur and charcoal acting as fuels, while the saltpeter works as an oxidizer.[3] Because of its burning properties and the amount of heat and gas volume that it generates, gunpowder has been widely used as a propellant in firearms and as a pyrotechnic composition in fireworks. Gunpowder was, according to prevailing academic consensus, discovered in the 9th century in China, attributed to Chinese alchemists searching for an elixir of immortality.[4] This discovery led to the invention of fireworks and the earliest gunpowder weapons in China. In the centuries following the Chinese discovery, gunpowder weapons began appearing in the Arab world, Europe, and India. The consensus is that this was spread from China, through the Middle East, and then into Europe,[5] although there remains some dispute over the amount of Chinese influence on later advancements in gunpowder technology. Gunpowder is classified as a low explosive because of its relatively slow decomposition rate and consequently low brisance. Low explosives deflagrate at subsonic speeds, whereas high explosives detonate, producing a supersonic wave. Ignition of the powder packed behind a bullet must generate enough pressure to force it from the muzzle at high speed, but not enough to rupture the gun barrel. Gunpowder is thus less suitable for shattering rock or fortifications. Gunpowder was widely used to fill artillery shells and in mining and civil engineering to blast rock roughly until the 2nd half of the 19th century, when the first high explosives (nitro-explosives) were discovered. Gunpowder is no longer used in modern explosive military warheads, nor is it used as main explosive in mining operations due to its cost relative to that of newer alternatives like ANFO. </div> <br /> <p><b>Scrollbar (alternate style), always shown</b></p> <div id="demo2" style="width:400px; height:130px; padding:10px; padding-right:8px; background:lightyellow; border:1px solid gray; overflow:scroll; resize:both;"> From Wikipedia- Gunpowder, also known since in the late 19th century as black powder, was the first chemical explosive and the only one known until the mid 1800s.[2] It is a mixture of sulfur, charcoal, and potassium nitrate (saltpeter) - with the sulfur and charcoal acting as fuels, while the saltpeter works as an oxidizer.[3] Because of its burning properties and the amount of heat and gas volume that it generates, gunpowder has been widely used as a propellant in firearms and as a pyrotechnic composition in fireworks. Gunpowder was, according to prevailing academic consensus, discovered in the 9th century in China, attributed to Chinese alchemists searching for an elixir of immortality.[4] This discovery led to the invention of fireworks and the earliest gunpowder weapons in China. In the centuries following the Chinese discovery, gunpowder weapons began appearing in the Arab world, Europe, and India. The consensus is that this was spread from China, through the Middle East, and then into Europe,[5] although there remains some dispute over the amount of Chinese influence on later advancements in gunpowder technology. </div> |
Przykład pobrany ze strony autorów skryptu