Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div id="wrapper">
<div id="title">NEWS</div>
<div  id="ticKer">
  <ul id="ulArea"> <!-- ul要素 箇条書き -->


                #wrapper {
  display: block;
  margin:30px auto;
#title {
  font-weight: 700;
  margin:0 0 20px 0;

  border-radius: 20px; /* 角丸ボーダー */
  width: 500px;  /* 横幅 */
  background:#D8D8D8; /* 背景色 */
  position: relative; /* 相対配置(相対位置)*/
  overflow: hidden; /* はみ出た部分を非表示 */
  margin: 0 auto;
#ticKer ul{
  padding: 0; /* 内側余白*/
  margin: 0 auto; 
#ticKer li{
  list-style-type: none; /* リストマーク なし */
  padding-left: 25px;
  color: #000;
  font-weight: 400;
  font-size: 16px;


                var  upSpeed=15;  //メッセージのスライド速度
var  delay =3000; // 次のメッセージに切り替わるまでの静止時間
var  tickerH=40;  // 表示ボックスの高さ
 window.onload =function divScroller(){
  scroller = document.getElementById("ticKer"); // div 表示ボックス tickerH+"px"; // 表示ボックスの高さ tickerH+"px"; // 行の高さ  
	  slide = document.getElementById("ulArea"); // スライドさせる ul要素 = "absolute"; // 絶対配置 = tickerH+"px" ;  // slide のtop(上辺)の位置
	innScroll(tickerH, upSpeed, delay)
  function innScroll(tickerH, upSpeed, delay){
   msec = upSpeed; // スクロール時間
   numTop = parseInt( // 数値文字列を整数に変換
  if (numTop > -tickerH){ // top位置が -30にならない間は = (numTop-1)+"px"; // top位置を -1px 上へ
  else{ = 0+"px"; 
               cngLi(); // 次のメッセージと交代
   if(numTop==0){msec = delay;// 静止時間 現在のメッセージを待機
    setTimeout("innScroll("+ tickerH +","+ upSpeed +"," + delay +")", msec);
function cngLi(){ // メッセージの移動
   base= document.getElementById("ulArea");
    liList = base.getElementsByTagName("li");// 与えられたタグ名を持つ要素のリスト
     elm = liList[0];// 最上部の "li"要素
    base.appendChild(elm); // elm を子ノードとして末尾に移動する。