Pen Settings

HTML

CSS

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

JavaScript

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

Packages

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.

Behavior

Auto Save

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.

HTML

              
                <!-- Powered by yawzhou -->
<link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link href="https://cdn.bootcss.com/animate.css/3.5.2/animate.min.css" rel="stylesheet">
<!-- 测试返回顶部数据 start -->
<div class="m-no">
    <h4 style="height: 500px">我只是个跑龙套的٩(๑òωó๑)۶</h4>
    <h4 style="height: 500px">都说了不要看我啦,看右边(☄⊙ω⊙)☄</h4>
    <h4 style="height: 500px">你怎么还看,再看我可要生气了o( ̄ヘ ̄o#)</h4>
    <h4 style="height: 500px">别看啦,来寒舍喝杯茶呗!(っ´Ι`)っ <a style="display:block;color: #39c;margin-top: 8px" href="http://yawzhou.com">http://yawzhou.com</a></h4>
</div>
	<div class="m">
		<h5 style="text-align: center;">
			手机端太大了,默认是不显示的哦,请在电脑端查看,如果需要yawrap(个人开发的web框架)完整版(更少代码响应式完美兼容各种设备)的可以关注我的项目进展,也可以找我定制哦o(*^@^*)o
   <a style="display:block;color: #39c;margin-top: 8px" href="http://yawzhou.com">http://yawzhou.com</a>
		</h5>
	</div>
	<!-- 测试返回顶部数据 end -->
	<!-- 右悬浮导航 start --> 
<div class="float-nav">
  <div id="yaw-chat" onclick="window.open('http://yawzhou.com')">
    <p style="position: relative;"><span style="position:absolute;top:3px;right: 15px; width: 8px;height: 8px;background: red;border-radius: 50%;"></span><i class="fa fa-comments-o" aria-hidden="true" style="font-size: 30px"></i><br>在线咨询</p>
  </div>
  <span id="yaw-phone">
    <p><i class="fa fa-phone" aria-hidden="true" style="font-size: 30px"></i><br>免费回电</p>
  </span>
  <div id="yaw-backup">
    <p><i class="fa fa-arrow-up" aria-hidden="true" style="font-size: 28px"></i><br>返回顶部</p>
  </div>
  <span id="yaw-phonecon">
    <span id="yaw-close"><i class="fa fa-times" aria-hidden="true"></i></span>
    <span id="yaw-left"><img src="http://img.yawzhou.com/kefu.jpg" width="135"><p style="margin: 5px auto;text-align: center;font-size: 18px"><strong>400-888-8888</strong></p></span>
    <span id="yaw-right">
      <h3 style="margin: 25px 0 20px;">留下电话,让我们主动联系您</h3>
      <p>输入您的联系电话,稍后您将接到我们的电话,该通话对您完全免费,请放心接听。</p>
      <script>
        function upperCase() {
          var dianhua1 = document.getElementById('dianhua1').value;
          var tijiao1 = document.getElementById("tijiao1");
          if(!(/^1[34578]\d{9}$/.test(dianhua1))) {
            tijiao1.disabled = true;
            tijiao1.style.background = 'red';
            tijiao1.value = '手机号码有误';
            return false;
          } else {
            tijiao1.disabled = false;
            tijiao1.style.background = '#333';
            tijiao1.value = '让我们联系您';
          }
        }
      </script>
      <form id="right-nav" action="demo.php" enctype="multipart/form-data" method="post">
        <input type="text" name="name" id="name1" value="" placeholder="请输入您的称呼">
        <input type="text" name="phone" id="dianhua1" value="" placeholder="请输入电话号码" onblur="upperCase()">
        <!--时间开始-->
        <input name="time" value="" type="hidden" id="shijian">
        <script type="text/JavaScript">
          window.onload = function(){ var nowDate = new Date(); var str = nowDate.getFullYear()+"-"+(nowDate.getMonth() + 1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+":"+nowDate.getSeconds(); document.getElementById("shijian").value=str; }
        </script>
        <!--时间结束-->
        <!-- 来源网址开始 -->
        <input name="source" value="" type="hidden" id="source">
        <script type="text/javascript">
          var url = window.location.href;
          document.getElementById("source").value = url;
        </script>
        <!-- 来源网址结束 -->
        <input type="submit" name="submit" id="tijiao1" value="让我们联系您">
      </form>
    </span>
  </span>
  <div id="yaw-phonecon-mask">
    <h3 style="text-align: center;color: #fff;letter-spacing: 3px">温馨提示</h4>
    <p style="margin: 0 auto;text-align: center;color:#fff;margin-top: 40px;letter-spacing: 2px">恭喜您提交成功!</p>
    <div id="yaw-phonecon-mask-close" style="margin: 0 auto; width: 100px;height: 30px;line-height:30px;background: #fff;color: #333;text-align: center;border-radius: 5px;margin-top: 50px;cursor: pointer;">我知道了</div>
  </div>
</div>    
<script src="https://cdn.bootcss.com/jquery/1.8.3/jquery.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.form/4.2.2/jquery.form.min.js"></script>
              
            
!

CSS

              
                .float-nav{
  position:fixed;
  right:5px;
  top:28%;
  z-index: 999999;
}
#yaw-chat{
  width: 60px;
  height: 60px;
  background: #fff;
  color: #777;
  text-align: center;
  padding: 5px;
  box-shadow: 0 0 5px #ccc;
  cursor: pointer;
}
#yaw-chat p{
  margin: 5px 0;
  line-height: 23px;
  font-size: 14px;
}
#yaw-backup{
  position: relative;
  display:none;
  width: 60px;
  height: 60px;
  background: #fff;
  color: #777;
  text-align: center;
  padding: 5px;
  box-shadow: 0 0 5px #ccc;
  cursor: pointer;
}
#yaw-backup p{
  margin: 5px 0;
  line-height: 23px;
  font-size: 14px;
}
#yaw-phone{
  position: relative;
  display:inline-block;
  width: 60px;
  height: 60px;
  background: #fff;
  color: #777;
  text-align: center;
  padding: 5px;
  box-shadow: 0 0 5px #ccc;
  cursor: pointer;
}
#yaw-phone p{
  margin: 5px 0;
  line-height: 23px;
  font-size: 14px;
}
#yaw-phonecon{
  position: absolute;
  bottom: 0;
  right: 75px;
  display: inline-block;
  width: 505px;
  height: 230px;
  padding: 5px;
  box-shadow: 0 0 5px #ccc;
  background: #fff;
  overflow: hidden;
  display: none;
}
#yaw-phonecon-mask{
  position: absolute;
  bottom: -2px;
  right: 75px;
  width: 505px;
  height: 230px;
  padding: 5px;
  box-shadow: 0 0 5px #ccc;
  background: #000;
  opacity: 0.9;
  overflow: hidden;
  display: none;
}
#yaw-left{
  float: left;
}
#yaw-right{
  float: right;
  width: 350px;
  margin-left: 20px;
}
#yaw-close{
  position: absolute;
  top: 6px;
  right: 10px;
  cursor: pointer;
}
#yaw-right p{
  margin-bottom: 26px;
}
#yaw-right #dianhua1,#yaw-right #name1{
  float: left;
  width:55%;
  height: 30px;
  border:none;
  border: 1px solid #999;
  padding: 0 5px;
  outline: none; 
  /*margin-bottom: 5px;*/
}
#yaw-right #name1{
  border-radius: 5px 0 0 0;   
}
#yaw-right #dianhua1{
  border-radius: 0 0 0 5px;
}
#yaw-right #tijiao1{
  width: 30%;
  outline: none;
  height: 64px;
  border:none;
  background: #333;
  color: #fff;
  /*margin-top: 32px;*/
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}
.m{
  display:none;
}
@media screen and (max-width: 460px){
  .float-nav,.m-no{
    display: none;
  }
  .m{
    display: block;
  }
}
              
            
!

JS

              
                // wait for the DOM to be loaded 
   $(document).ready(function() { 
// bind 'myForm' and provide a simple callback function 
//ajax提交表单
   $('#right-nav').ajaxForm(function() { 
// alert("恭喜!您的信息已经提交成功!"); 
   $('#right-nav').get(0).reset();
   $('#yaw-phonecon-mask').show();
 }); 
   $('#yaw-phonecon-mask-close').click(function() {
     $('#yaw-phonecon-mask,#yaw-phonecon').removeClass('animated bounceInRight').addClass('animated bounceOutRight');
     })
  });
 $(function() {
   $('#yaw-phone,#yaw-chat,#yaw-backup').mouseover(function() {
                $(this).css({background:'#666',color:'#fff'}).addClass('animated pulse');
            })
   $('#yaw-phone,#yaw-chat,#yaw-backup').mouseout(function() {
                $(this).css({background:'#fff',color:'#666'}).removeClass('animated pulse');
            })
   $('#yaw-phone').click(function() {
     $('#yaw-phonecon').show().removeClass('animated bounceOutRight').addClass('animated bounceInRight');
   })
   $('#yaw-close').click(function() {
     $('#yaw-phonecon').removeClass('animated bounceInRight').addClass('animated bounceOutRight');
   })

   $('#tijiao1').click(function() {
     if ($('#name1').val() == '') {
       $('#name1').focus();
       return false;
     }else if ($('#dianhua1').val() == '') {
       $('#dianhua1').focus();
       return false;
     }
   })
   //返回顶部
   $(window).scroll(function() {
     if ($(window).scrollTop()>300) {
       $('#yaw-backup').show();
     }else{
       $('#yaw-backup').hide();
     }
   })
   $("#yaw-backup").click(function() {
     var speed = 666;
     $('body,html').animate({ scrollTop: 0 }, speed);
     return false;
   });
 })
              
            
!
999px

Console