@charset "Shift_JIS";

/* 要素リセット */
body{
  /* 画像ファイルの指定 */
  background-image: url(sozai/kabe/kabe05.jpg);
  /* 画像を常に天地左右の中央に配置 */
  background-position: center center;
  /* 画像をタイル状に繰り返し表示しない */
  background-repeat: no-repeat;  /* コンテンツの高さが画像の高さより大きい時、動かないように固定 */
  background-attachment: fixed;
  /* 表示するコンテナの大きさに基づいて、背景画像を調整 */
  background-size: cover;   
  /* 背景画像が読み込まれる前に表示される背景のカラー */
  background-color: #464646;
    margin: 0;         /* 余白の削除 */
    padding: 0;        /* 余白の削除 */
    width:100%;
    height:100%;
	font-size: 11px;
	font-family: 'メイリオ', Meiryo, 'ヒラギノ角ゴ Pro W3', 'Hiragino Kaku Gothic Pro', 'ＭＳ Ｐゴシック', 'Osaka', sans-serif;
	color: black;/* 標準文字色 */
}

/* Safari用ハック 文字サイズ調整 */
/*\*/
html:first-child body{
    font-size: 70%;
}
/* end */

img{
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
}

/* リンク文字色 */
a:link{
	color: #FFFF;
	text-decoration: underline;
}
a:visited {
	color: #FFFF;
}
a:hover{
	color: rgb(153, 0, 0);
	text-decoration: underline;
}
a:active{
	color: rgb(153, 0, 0);
	text-decoration: underline;
}

#skip{
    /* ヘッダースキップの非表示 */
    height: 1px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    
}
form{
    /* フォームをページの中央に置く */
    margin: 0 auto;
    width: 300px;
    /* フォームの範囲がわかるようにする */
    padding: 1em;
    border: 1px solid #CCC;
    border-radius: 1em;
}

form div + div{
    margin-top: 1em;
}

label{
    /* すべてのラベルを同じサイズにして、きちんと揃える */
    display: inline-block;
    width: 90px;
    text-align: right;
}

input, textarea{
	/* すべてのテキストフィールドのフォント設定を一致させる
       デフォルトで、textarea は等幅フォントが設定されている */
	font-style: normal;
	font-variant: normal;
	font-weight: normal;
	font-size: 1em;
	line-height: normal;
	font-family: sans-serif;/* すべてのテキストフィールドを同じサイズにする */
	width: 250px;
	-moz-box-sizing: border-box;
	box-sizing: border-box;/* テキストフィールドのボーダーの外見を同一にする */
	border-width: 3px;
	border-style: groove;
	border-color: #999999;
}

input:focus, textarea:focus{
    /* アクティブな要素を少し強調する */
    border-color: #000;
}

textarea{
    /* 複数行のテキストフィールドをラベルにきちんと揃える */
    vertical-align: top;

    /* テキスト入力に十分な領域を与える */
    height: 5em;

    /* ユーザが textarea を垂直方向にリサイズできるようにする
       これが動作しないブラウザもある */
    resize: vertical;
}

.button{
    /* ボタンを他のテキストフィールドと同じ場所に置く */
    padding-left: 0px; /* label 要素と同じサイズ */
}

#container{
	width: 100%;
}
#header{
       position: fixed !important;
	top: 0px;/* 位置(上0px) */
	left: 0px;/* 位置(右0px) */
	width: 100%;/* 横幅100%　*/
	height: 40px;/* 縦幅35px */
	background-image: url(sozai/kabe/header01.png);
	background-repeat: repeat;
	text-align: center;
       z-index: 1;
}



#header h1{
	visibility: hidden;
	font-size: 1px;
}

#header-logo{
	margin-right: auto;
	margin-left: auto;
	text-align: left;
}
#header-ad{
	text-align: right;
	font-size: 15px;
	background-repeat: no-repeat;
	padding-right: 20px;
	padding-bottom: 0px;
	padding-left: 10px;
	color: white;
	margin-top: -20px;
}


#header-logo a{
	text-indent: -9999px;
	background-image: url(sozai/kabe/rogo.png);
	background-size: 100px 30px;
	background-position: left center;
	background-repeat: no-repeat;
	display: block;
	visibility: visible;
	width: 100px;
	height: 32px;
	margin-left: 15px;
}
#menu-back{
	height: 200px;
	width: 1024px;
	margin-right: auto;
	margin-left: auto;
	margin-top: 50px;
	background-image: url(sozai/kabe/menu-back.png);
       border-top-right-radius: 20px;
       border-top-left-radius: 20px;
       position:relative; //
}

#menu{
	width: 1024px;
	border-top-width: 2px;
	border-top-style: solid;
	border-top-color: #660000;
	border-bottom-width: 2px;
	border-bottom-style: solid;
	border-bottom-color: #660000;
	bottom: 0px;
	margin-bottom: 10px;
	margin-left: 10px;
	margin-right: 10px;
	position: absolute;
}
	

#contents{
	width: 1024px;
	min-height: 768px;
	color: #000000;
	margin-top: 10px;
	margin-right: auto;
	margin-left: auto;
	margin-bottom: 1.5%;
	font-size: 1.6em;
	line-height: 1.5em;
	border-bottom-right-radius: 20px 20px;
	border-bottom-left-radius: 20px 20px;
	background-image: url(sozai/kabe/mbg01.png);
	padding-top: 5px;
	padding-bottom: 10px;
	padding-left: 5px;
	padding-right: 5px;
}


#footer{
	width: 100%;
	height: 30px;
	color: white;
	font-size: 12px;
	text-align: center;
	background-image: url(sozai/kabe/header01.png);
}


.top-left{
	text-align: center;
	vertical-align: top;
	width: 225px;}

.top-center{
	text-align: center;
	vertical-align: top;
	width : 560px;
}
.top-right{
	
	vertical-align: top;
	width : 225px;
}

.sch-center{
	text-align: center;
	vertical-align: top;
	width : 1000px;
}

.abt-left{
	
	vertical-align: top;
	width : 710px;
}

.abt-right{
	text-align: left;
	vertical-align: top;
	width: 300px;
}
.aboutright{
	text-align: center;
	vertical-align: top;
	width : 350px;
}
.accleft{
	width: 200px;
	margin-left: 10px;
	vertical-align: top;
}
.aboutcenter{
	text-align: left;
	vertical-align: top;
	width: 970px;
}
.Class{
	margin-left: 20px;
	margin-top: -15px;
	margin-right: 20px;
	text-align: center;
  overflow : auto;
  visibility : hidden;
}
.music{
	vertical-align: top;
}
.release{
	vertical-align: top;
	width: 600px;
	border-width: 1px;
	border-style: solid;
	border-color: gray;
	font-size: 15px;
	text-align: left;
	padding-top: 10px;
	padding-left: 10px;
	padding-right: 10px;
	padding-bottom: 10px;
}
.by{

	border-width: 1px;
	border-style: solid;
	border-color: gray;
}
.by_left{
      width:80px;
	border-width: 1px;
	border-style: solid;
	border-color: gray;
	margin-left: 10px;
	color: white;
	background-color: maroon;

}
.by_right{
      width:200px;

}
#mail{
	margin-left: 20px;
	margin-right: 20px;
	text-align: left;
	font-size: 15px;
}

#month{
	vertical-align: top;
}

#sch{
	width: 1000px;
	background-color: white;
	border-top-right-radius: 20px 20px;
	border-top-left-radius: 20px 20px;
	border-bottom-right-radius: 20px 20px;
	border-bottom-left-radius: 20px 20px;
	margin-top: 10px;
	margin-right: 5px;
	margin-bottom: 5px;
	margin-left: 5px;
	padding-top: 10px;
	padding-left: 5px;
	padding-right: 5px;
	padding-bottom: 5px;
}
#topicks{
	width: 215px;
	height: 300px;
	border-top-right-radius: 20px 20px;
	border-top-left-radius: 20px 20px;
	border-bottom-right-radius: 20px 20px;
	border-bottom-left-radius: 20px 20px;
	margin-top: 10px;
	margin-right: 0px;
	margin-bottom: 5px;
	margin-left: 5px;
	padding-top: 10px;
	padding-left: 5px;
	padding-right: 0px;
	padding-bottom: 5px;
	background-image: url(sozai/kabe/mgb02.png);
	line-height: 1em;
	text-align: left;
	font-size: 11px;
	overflow-y: scroll;
}

#word{
	width: 680px;
	border-top-right-radius: 20px 20px;
	border-top-left-radius: 20px 20px;
	border-bottom-right-radius: 20px 20px;
	border-bottom-left-radius: 20px 20px;
	margin-top: 10px;
	margin-right: 5px;
	margin-bottom: 5px;
	margin-left: 5px;
	padding-top: 10px;
	padding-left: 5px;
	padding-right: 5px;
	padding-bottom: 5px;
	background-image: url(sozai/kabe/mgb02.png);
}
#equ{
      font-size : 10px;
	margin-left : 560px;
  background-color : inherit;
  margin-top : 3px;
}

#wanleft{
	width : 500px;
	margin-left: 20px;
      font-size : 10px;
	
       background-color : inherit;
  margin-top : -652px;
}
#table_sch{
	width: 100%;
  margin-top : -5px;
}

#d{
	margin-left: 625px;
	margin-top: -45px;
	line-height : 15px;
       text-align : right;
}

#k{
    margin-left: 0px;
    margin-bottom: 10px;
    float: right;
    padding-right: 10px;
    padding-bottom: 10px;
    padding-left: 10px;
    margin-top : -90px;
    margin-right : 20px;
}

.wan{
    border-width: 0.1px;
	border-style: dashed;
	border-color: black;
}

.sch{
	border-width: 0.1px;
	border-style : ridge;
	border-color: black;
	
	font-size: 10px;
	
  
  
  
  width : 180px;
  height : 235px;
}
.month{
	width : 180px;
	color: white;
	background-color: black;
  text-align : center;
}

.monthsat{
	width : 180px;
	color: white;
	background-color: navy;
	font-size: 13px;
  text-align : center;
}
.monthsun{
	width : 180px;
	color: white;
	background-color: rgb(153, 0, 0);
	font-size: 13px;
  text-align : center;
}

.day{
	width : 176px;
	
       vertical-align:top;
	height: 30px;
  

  text-align : left;
}
.daysat{
	width : 30px;
	height : 30px;
	color: white;
	background-color: navy;
	font-size: 12px;
  text-align : center;
}
.daysun{
	width: 35px;
	height: 35px;
	color: white;
	background-color: rgb(153, 0, 0);
	font-size: 12px;
  text-align : center;
}
.schnot{
	width : 180px;
	
  visibility : hidden;
  height : 235px;
}

.title{
	font-size: 12px;
	background-image : url(http://www.yoyogi-barbara.jp/title.png);
	background-repeat: no-repeat;
	text-align: center;
	line-height: 12px;
	vertical-align: middle;
	color: white;
	height: 35px;
}
.title_min{
	font-size: 9px;
	background-image : url(http://www.yoyogi-barbara.jp/title_min.png);
	background-repeat: no-repeat;
	text-align: center;
	line-height: 9px;
	vertical-align: middle;
	color: white;
	height: 20px;
}
.act{
	font-size: 12px;
	text-align: center;
	vertical-align: middle;
	line-height: 12.5px;
	height: 100px;
}
.act_min{
	font-size: 10px;
	text-align: center;
	vertical-align: middle;
	line-height: 10px;
	height: 30px;
}
.list{
	font-size: 11px;
	text-align: center;
	vertical-align: top;
	line-height : 11px;
}
.list_min{
	font-size: 8px;
	text-align: center;
	vertical-align: top;
	line-height : 8px;
}
.word{
	font-size: 9px;
	vertical-align: top;
	line-height: 9px;
	color: maroon;
}

.mini{
	font-size: 7px;
  line-height : 7px;
}


フリーランスWebデザイナーの仕事
フリーランスWebデザイナーが日々の仕事で実践した技術や培ったノウハウ、業務での成功や失敗、ソーシャルメディア活用術を綴ります！WebデザイナーじゃなくてもWebのお仕事をされている人達のお役に立てれば幸いです。
jQueryでアメブロのRSSを読み込み、ホームページに表示（zRSSFeed）

    14,425 view
    2012年04月17日（火）

DSC_2275

当方では、ホームページとアメーバブログを連携させたサービスを提供しております。
そのお仕事の中で、アメブロの記事のリストをホームページのトップページに表示させるのですが、当方が利用している術を紹介致します。
色々と導入方法はあるのですが、一番使いやすいツールとして、zRSSFeedというjQueryのプラグインを紹介します。
導入方法

必要ファイルをzRSSFeedのサイトよりダウンロードして、ホームページ内HTMLのhead要素の範囲内に設置して下さい。
RSS Feeds Reader Plugin for jQuery

<script type="text/javascript" src="js/jquery.js"></script> <script src="js/jquery.zrssfeed.min.js" type="text/javascript"></script>

続けて以下のように記述します。

<script type="text/javascript"> $(document).ready(function () {   $('.ameblo').rssfeed('任意のRSS URL', {     limit: 6   }); }); </script>

「limit: 6」が表示する記事数なので、数字を任意に変更して下さい。

<script type="text/javascript"> $(document).ready(function () {   $('.ameblo').rssfeed('任意のRSS URL', {     limit: 6,     header: false,     titletag: 'span',     content: false  }); }); </script>

上記は、タイトルと日付のみが表示されます。

オプションについて詳しくはRSS Feeds Reader Plugin for jQueryページを確認してください。
CSSは下記になります（任意で変更して下さい）。

.ameblo {
clear:both;
margin: 0;
padding: 0;
width: 226px;
overflow:hidden;
}
.rssBody ul{
	margin: 0px;
padding: 0px;
}
.rssBody ul li{
	margin: 0 0 8px 0;
padding: 0 4px 8px 4px;
border-bottom: dotted 1px #CCCCCC;
list-style:none;
width:218px;
overflow:hidden;
}
.rssRow{
	padding: 0px; 
}
.rssRow div{
	float:left;
width:226px;
}