<!-- jQueryとfullPage.jsを追加 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/jquery.fullpage.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/jquery.fullpage.js"></script>
<script>
$(function () {
$('#fullpage').fullpage({
option
});
});
</script>
<div id="fullpage">
<div class="section">...</div>
<div class="section">
<div class="slide">...</div>
<div class="slide">...</div>
...
</div>
<div class="section">...</div>
...
</div>
Property | Type | Default | Description |
---|---|---|---|
controlArrows | Boolean | true | Determines whether to use control arrows for the slides to move right or left. |
verticalCentered | Boolean | true | Vertically centering of the content within sections. When set to true, your content will be wrapped by the library. Consider using delegation or load your other scripts in the afterRender callback. |
scrollingSpeed | Number | 700 | Speed in milliseconds for the scrolling transitions. |
sectionsColor | Array | none | Define the CSS background-color property for each section. Example: |
anchors | Array | [] | Defines the anchor links (#example) to be shown on the URL for each section. Anchors value should be unique. The position of the anchors in the array will define to which sections the anchor is applied. (second position for second section and so on). Using anchors forward and backward navigation will also be possible through the browser. This option also allows users to bookmark a specific section or slide. Be careful! anchors can not have the same value as any ID element on the site (or NAME element for IE). Now anchors can be defined directly in the HTML structure by using the attribute data-anchor as explained here. |
lockAnchors | Boolean | false | Determines whether anchors in the URL will have any effect at all in the library. You can still using anchors internally for your own functions and callbacks, but they won't have any effect in the scrolling of the site. Useful if you want to combine fullPage.js with other plugins using anchor in the URL. |
easing | String | easeInOutCubic | Defines the transition effect to use for the vertical and horizontal scrolling. It requires the file vendors/jquery.easings.min.js or jQuery UI for using some of its transitions. Other libraries could be used instead. |
easingcss3 | String | ease | Defines the transition effect to use in case of using css3:true. You can use the pre-defined ones (such as linear, ease-out...) or create your own ones using the cubic-bezier function. You might want to use Matthew Lein CSS Easing Animation Tool for it. |
loopTop | Boolean | false | Defines whether scrolling up in the first section should scroll to the last one or not. |
loopBottom | Boolean | false | Defines whether scrolling down in the last section should scroll to the first one or not. |
loopHorizontal | Boolean | true | Defines whether horizontal sliders will loop after reaching the last or previous slide or not. |
css3 | Boolean | true | Defines whether to use JavaScript or CSS3 transforms to scroll within sections and slides. Useful to speed up the movement in tablet and mobile devices with browsers supporting CSS3. If this option is set to true and the browser doesn't support CSS3, a jQuery fallback will be used instead. |
autoScrolling | Boolean | true | Defines whether to use the "automatic" scrolling or the "normal" one. It also has affects the way the sections fit in the browser/device window in tablets and mobile phones. |
fitToSection | Boolean | true | Determines whether or not to fit sections to the viewport or not. When set to true the current active section will always fill the whole viewport. Otherwise the user will be free to stop in the middle of a section. |
fitToSectionDelay | Number | 1000 | fitToSectionDelay: (default 1000). If fitToSection is set to true, this delays the fitting by the configured milliseconds. |
scrollBar | Boolean | false | Determines whether to use scrollbar for the site or not. In case of using scroll bar, the autoScrolling functionality will still work as expected. The user will also be free to scroll the site with the scroll bar and fullPage.js will fit the section in the screen when scrolling finishes. |
paddingTop | Number | 0 | Defines the top padding for each section with a numerical value and its measure (paddingTop: '10px', paddingTop: '10em'...) Useful in case of using a fixed header. |
paddingBottom | Number | 0 | Defines the bottom padding for each section with a numerical value and its measure (paddingBottom: '10px', paddingBottom: '10em'...). Useful in case of using a fixed footer. |
fixedElements | Selector | null | Defines which elements will be taken off the scrolling structure of the plugin which is necessary when using the css3 option to keep them fixed. It requires a string with the jQuery selectors for those elements. (For example: fixedElements: '#element1, .element2') |
normalScrollElements | Selector | null | If you want to avoid the auto scroll when scrolling over some elements, this is the option you need to use. (useful for maps, scrolling divs etc.) It requires a string with the jQuery selectors for those elements. (For example: normalScrollElements: '#element1, .element2'). This option should not be applied to any section/slide element itself. |
normalScrollElementTouchThreshold | Number | 5 | Defines the threshold for the number of hops up the html node tree Fullpage will test to see if normalScrollElements is a match to allow scrolling functionality on divs on a touch device. (For example: normalScrollElementTouchThreshold: 3) |
bigSectionsDestination | String (top, bottom, null) | null | Defines how to scroll to a section which size is bigger than the viewport. By default fullPage.js scrolls to the top if you come from a section above the destination one and to the bottom if you come from a section below the destination one. Possible values are top, bottom, null. |
keyboardScrolling | Boolean | true | Defines if the content can be navigated using the keyboard. |
touchSensitivity | Number | 5 | Defines a percentage of the browsers window width/height, and how far a swipe must measure for navigating to the next section / slide |
continuousVertical | Boolean | false | Defines whether scrolling down in the last section or should scroll down to the first one and if scrolling up in the first section should scroll up to the last one. Not compatible with loopTop, loopBottom or any scroll bar present in the site (scrollBar:true or autoScrolling:false). |
animateAnchor | Boolean | true | Defines whether the load of the site when given an anchor (#) will scroll with animation to its destination or will directly load on the given section. |
recordHistory | Boolean | true | Defines whether to push the state of the site to the browser's history. When set to trueeach section/slide of the site will act as a new page and the back and forward buttons of the browser will scroll the sections/slides to reach the previous or next state of the site. When set to false, the URL will keep changing but will have no effect on the browser's history. This option is automatically turned off when using autoScrolling:false. |
menu | Boolean | false | A selector can be used to specify the menu to link with the sections. This way the scrolling of the sections will activate the corresponding element in the menu using the class active. This won't generate a menu but will just add the active class to the element in the given menu with the corresponding anchor links. In order to link the elements of the menu with the sections, an HTML 5 data-tag (data-menuanchor) will be needed to use with the same anchor links as used within the sections. |
navigation | Boolean | false | If set to true, it will show a navigation bar made up of small circles. |
navigationPosition | String (left or right) | none | It can be set to left or right and defines which position the navigation bar will be shown (if using one). |
navigationTooltips | Array | [] | Defines the tooltips to show for the navigation circles in case they are being used. Example: navigationTooltips: ['firstSlide', 'secondSlide']. You can also define them by using the attribute data-tooltip in each section if you prefer. |
showActiveTooltip | Boolean | false | Shows a persistent tooltip for the actively viewed section in the vertical navigation. |
slidesNavigation | Boolean | false | If set to true it will show a navigation bar made up of small circles for each landscape slider on the site. |
slidesNavPosition | String (top or bottom) | bottom | Defines the position for the landscape navigation bar for sliders. Admits top and bottom as values. You may want to modify the CSS styles to determine the distance from the top or bottom as well as any other style such as color. |
scrollOverflow | Boolean | false | (not compatible with IE 8) defines whether or not to create a scroll for the section/slide in case its content is bigger than the height of it. When set to true, your content will be wrapped by the plugin. Consider using delegation or load your other scripts in the afterRender callback. In case of setting it to true, it requires the vendor library scrolloverflow.min.js. This file has to be loaded before the fullPage.js plugin, but after jQuery. For example: |
scrollOverflowOptions | scrollOverflowOptions: when using scrollOverflow:true fullpage.js will make use of a forked and modified version of iScroll.js library. You can customize the scrolling behaviour by providing fullpage.js with the iScroll.js options you want to use. Check its documentation for more info. | ||
sectionSelector | Selector | .section | Defines the jQuery selector used for the plugin sections. It might need to be changed sometimes to avoid problem with other plugins using the same selectors as fullpage.js. |
slideSelector | Selector | .slide | Defines the jQuery selector used for the plugin slides. It might need to be changed sometimes to avoid problem with other plugins using the same selectors as fullpage.js. |
responsiveWidth | Number | 0 | A normal scroll (autoScrolling:false) will be used under the defined width in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's width is less than 900 the plugin will scroll like a normal site. |
responsiveHeight | Number | 0 | A normal scroll (autoScrolling:false) will be used under the defined height in pixels. A class fp-responsive is added to the body tag in case the user wants to use it for his own responsive CSS. For example, if set to 900, whenever the browser's height is less than 900 the plugin will scroll like a normal site. |
parallaxOptions | String | { type: 'reveal', percentage: 62, property: 'translate'} | parallaxOptions: (default: { type: 'reveal', percentage: 62, property: 'translate'}). Allows to configure the parameters for the parallax backgrounds effect when using the option parallax:true. Read more about how to apply the parallax option. |
lazyLoading | Boolean | true | Lazy loading is active by default which means it will lazy load any media element containing the attribute data-src as detailed in the Lazy Loading docs . If you want to use any other lazy loading library you can disable this fullpage.js feature. |
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- jQueryとfullPage.jsを追加 -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/jquery.fullpage.css">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fullPage.js/2.9.5/jquery.fullpage.js"></script>
<title>fullPage.js #1. 基本的なフルスクリーンスクロール</title>
<style>
.section {
padding: 0 4em;
color: #fff;
}
</style>
</head>
<body class="fix">
<script>
$(function () {
$('#fullpage').fullpage({
anchors: ['firstPage', 'secondPage', '3rdPage'],
sectionsColor: ['#0F7DC2', '#1BBC9B', '#7E8F7C'],
scrollBar: false
});
});
</script>
<div id="fullpage">
<div class="section " id="section0">
<div class="intro">
<h1>fullPage.js <small>#1. 基本的なフルスクリーンスクロール</small></h1>
<p class="dlw-description">fullPage.jsはフルスクリーンスクロールjQueryプラグインです。
<br>ここでは、基本的なfullPage.jsのフルスクリーンスクロールを掲載しています。</p>
</div>
</div>
<div class="section" id="section1">
<div class="slide" id="slide1">
<div class="intro">
<h1>スライドナビゲーション</h1>
<p>垂直方向だけでなく水平方向にも画面を移動できます。</p>
</div>
</div>
<div class="slide" id="slide2">
<h1>Slide 2</h1>
</div>
<div class="slide" id="slide3">
<h1>Slide 3</h1>
</div>
</div>
<div class="section" id="section2">
<div class="intro">
<h1>詳細はこちら</h1>
</div>
</div>
</div>
</body>
</html>
ここではテキストにスタイルシートで様々な効果を付したデザインサンプルを掲載しています。
見出しは、その下の記事の性質を示すテキストです。
ここでは、スタイルシートを使用した見出しのデザインサンプルが掲載しています。
HTML <ol> 要素は順序付けられた項目リストを表します。
ここでは、スタイルシートを使用するolのデザインサンプルを掲載しています。
HTML <hr>要素は、段落レベルの要素間のテーマ区切りを表します。
ここでは、スタイルシートを使用してhrのデザインサンプルを掲載しています。
CSSプロパティbox-shadowは、要素のフレーム枠の周囲にシャドーエフェクトを追加するために使用されます。
ここでは、スタイルシートを使用したボックスシャドウプロパティのデザインサンプルを掲載しています。
このサンプルではIE用にPicturefillを追加しています。
Bootstrapフレームワークの標準的なボタンデザインです。
Hover.cssはマウスオーバー効果のスタイルシートコレクションです。
Button.cssは、CSS3のボタンアニメーションのコレクションです。
これはBootstrapフレームワークの標準的なカードデザインのまとめです。
Arctext.jsは文字列を指定した円半径に沿ってカーブさせるjQueryプラグインです。
Lettering.jsは、1文字、1単語、1列の指定された文字列を<span>タグで囲むjQueryプラグインです。
Textillate.jsは、イン/アウトアニメーションエフェクトをテキストに追加するjQueryプラグインです。
FitText.jsは、親要素の幅に応じてフォントサイズをフィットさせるjQueryプラグインです。
FeedEkは、RSSフィードとAtomフィードを解析して表示するjQueryプラグインです。
YouTubeのさまざまな埋め込み方法の紹介。
FitVidsはiframeで埋め込まれたYouTube動画をレスポンシブ対応に変換するjQueryプラグインです。
xZoomは画像のズームプレビューを表示するjQueryプラグインです。
プレビュー位置とズームをカスタマイズすることができます。
Instagram.cssは、インスタントグラムのような写真をフィルタリングするスタイルシートです。
Moment.jsは日付と時刻を処理して表示するjavascriptです。
このサンプルでは日本語にローカライズしています。
Bootstrap Material DatePickerはMoment.jsを使用したjQueryデータピッカープラグインです。
MultifilterはjQueryテーブルフィルタリングプラグインです。
"display: flex;"を使用したレスポンステーブル
rowspanはサポートされていません。
"display: grid;"を使用したレスポンステーブル
rowspanはサポートされていません。
Bootstrapフレームワークの標準的なテーブルデザインです。
jQuery Mask Pluginは、フォームフィールドでマスク(検証)を行うjQueryプラグインです。
Select2は、セレクトフォームをより高度にするjqueryプラグインです。
Select2の基本的な使い方は次のとおりです。
jQuery Searcherは、さまざまなマークアップをサポートするjQuery検索/フィルタリングプラグインです。
Bootstrapフレームワークの標準的なカルーセルです。
FlexSliderはレスポンシブjQueryスライダープラグインです。
ここにはFlexsliderの基本的な単一スライダー設定を掲載しています。
FlexSliderはレスポンシブjQueryスライダープラグインです。
ここにはFlexsliderの基本的なカルーセルスライダー設定を掲載しています。
fancyBoxはjQueryライトボックスプラグインです。
ここではfancyBoxの基本的なイメージライトボックスの設定を行います。
fancyBoxはjQueryライトボックスプラグインです。
ここでは、YouTube、Vimeo、Instagram、Googleマップ、fancyBoxのインラインHTML、iframeライトボックスの設定を掲載しています。
animsitionはページ遷移時にアニメーションエフェクトを追加するjQueryプラグインです。
GreedyNavは画面縮小時にはみ出した項目をドロップダウンに切り替えるjQueryを用いたレスポンシブナビゲーションメニューです。
GridTabはグリッドベースのレスポンシブタブを作成する軽量なjQueryプラグインです。
jQuery.NiceScrollはスクロールの表示と機能を拡張するjQueryプラグインです。
metisMenuは水平・垂直メニューを展開するjQueryプラグインです。
fullPage.jsはフルスクリーンスクロールjQueryプラグインです。
ここでは、基本的なfullPage.jsのフルスクリーンスクロールを掲載しています。
fullPage.jsはフルスクリーンスクロールjQueryプラグインです。
ここではナビゲーションメニューを表示しています。
Offside.jsはオフキャンバス展開するJavaScriptキットです。
これは、左側オフキャンバスが展開するサンプルです。
Offside.jsはオフキャンバス展開するJavaScriptキットです。
これは、複数のオフキャンバスが展開するサンプルです。
Filterizrはコンテナ内のアイテムをフィルタリング、並べ替え、シャッフル、検索をするjQueryプラグインです。
これはオプションを使用しない基本的なサンプルです。
Filterizrはコンテナ内のアイテムをフィルタリング、並べ替え、シャッフル、検索をするjQueryプラグインです。
これはFilterizrのより高度なフィルタリングのサンプルです。
animsitionはページ遷移時にアニメーションエフェクトを追加するjQueryプラグインです。
Textillate.jsは、イン/アウトアニメーションエフェクトをテキストに追加するjQueryプラグインです。
Scrollaはスクロール時に表示するアイテムにアニメーション効果を付加するjQueryプラグインです。
Hover.cssはマウスオーバー効果のスタイルシートコレクションです。
Animate.cssはアニメーション効果のスタイルシートコレクションです。
jQuery Easing Plugin はjQueryのイージング(アニメーション効果)を拡張するプラグインです。
ここでは要素へのイージングのサンプルを掲載しています。
fullPage.jsはフルスクリーンスクロールjQueryプラグインです。
ここでは、基本的なfullPage.jsのフルスクリーンスクロールを掲載しています。
fullPage.jsはフルスクリーンスクロールjQueryプラグインです。
ここではナビゲーションメニューを表示しています。
jQuery.mb.YTPlayerは背景にYouTube動画を表示するjQueryプラグインです。
Hint.cssはツールチップ用のスタイルシートです。
クラス名を追加するだけでツールチップを表示することが出来ます。
Protipはツールチップを生成するjQueryプラグインです。
ツールヒントの位置、大きさなどは、データ属性のみで設定します。
Bootstrapフレームワークの標準的なカルーセルです。
これはBootstrapフレームワークの標準的なカードデザインのまとめです。
Bootstrapフレームワークの標準的なボタンデザインです。
Bootstrapフレームワークの標準的なテーブルデザインです。
GreenSockによるTweenMAX、TweenLite、TimelineLite、TimelineMaxのチートシート
このページでは、コードをまとめて検索することができます。