前端相关代码

前端相关代码

前端相关代码

修改divi主题默认字体
进入网站后台 Divi –> 主题设置 –> 基本 拖到最下面的  自定义CSS 项目
body, h1, h2, h3, h4, h5, h6, input, textarea, select { font-family: Arial, "Microsoft YaHei", 黑体, 宋体, sans-serif; }



在网页中嵌套另外一个页面
<iframe src="http://home.jocksliu.cn/" width="960" height="800" frameborder="1/0"> &nbsp; </iframe>


HTML百度搜索菜单
<div class="header ">   <div class="container">     <h1 class="logo"> <strong> <a href="<?php bloginfo('url'); ?>" title="<?php bloginfo('name'); ?>"> <img src="<?php echo cs_get_option( 'i_logo_image', '' ); ?>" alt="<?php bloginfo('name'); ?>"> </a> </strong> </h1>     <div class="primary-menus">       <ul class="selects">         <li> 常用 </li>         <li class="current" data-target="baidu-search"> <span>百度</span> </li>         <li data-target="google-search"> <span>google</span> </li> <li data-target="uiii-search"> <span>站内搜索</span> </li>       </ul>       <div class="cont">               <?php if( cs_get_option( 'dawa_header_u' ) ) { ?>         <div class="right-link">        <?php echo cs_get_option( 'dawa_header_ad' ); ?>           </div>            <?php }?>         <div class="left-cont">            <form class="search" id="baidu-search" action="https://www.baidu.com/s" method="get" target="_blank">             <input type="text" name="wd" class="s" value="<?php bloginfo('name'); ?>">             <button type="submit" name="submit" class="btn">百度一下</button>           </form>           <form class="search hidden" id="google-search" action="https://www.google.com/search" method="get" target="_blank">             <input type="text" name="q" class="s" value="<?php bloginfo('name'); ?>">             <button type="submit" name="submit" class="btn">Google</button>           </form>           <form class="search hidden " id="uiii-search" action="<?php bloginfo('url');?>" method="get" target="_blank">             <input type="text" name="s" class="s" value="站内搜索">             <button type="submit" class="btn">站内搜索</button>           </form>                         </div>       </div>     </div>   </div> </div>


JS实现双击负责指定内容
//js部分     <script>          function copyToClipboard(s) {             if (window.clipboardData) {                 window.clipboardData.setData('text', s);             } else {                 (function(s) {                     document.oncopy = function(e) {                         e.clipboardData.setData('text', s);                         e.preventDefault();                         document.oncopy = null;                     }                 })(s);                 document.execCommand('Copy');             }         }     </script>   //元素部分  <p  onclick="copyToClipboard('要置切剪板的内容')">复制</p>



divibody雅黑代码宋体

我来吐槽

*

*