第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

我們?nèi)绾卧诖蛴☆A(yù)覽中添加 css?

我們?nèi)绾卧诖蛴☆A(yù)覽中添加 css?

PHP
烙印99 2022-06-11 18:49:38
代碼:<style>  .center {    float: left;    text-align: center;  }  .center h3 {    color: #000;    font-weight: 600;  }  .left {    font-size: 14px;    float: left;    width: 30%;    color: #000;  }  .right {    font-size: 14px;    float: right;    width: 70%;    color: #000;  }  #bot {    margin-bottom: 2em;  }  #left {    font-size: 14px;    float: left;    width: 42%;    color: #000;  }  #right {    font-size: 14px;    float: right;    width: 58%;    color: #000;  }  table, td, th {      border: 1px solid #000;    text-align: left;    font-size: 14px;    font-weight: inherit;  }  table {    border-collapse: collapse;    width: 100%;  }  th, td {    padding: 15px;  }  #pp {    font-size:14px;    color:#000;  }  .table-responsive {      overflow-x: hidden!important;  }  .dataTables_wrapper .dataTables_paginate .paginate_button {    padding:0px!important;  }  </style><div class="col-md-12">  <a href="javascript:void(0)" class="btn btn-success" style="float: right;" onclick='printDiv();'>Print Sheet</a></div><div id="print_wrapp">  <div class="col-md-12" id="bot">    <div class="col-md-2">      <img src="<?php echo base_url(); ?>uploads/images/Lingayas Vidyapeeth Logo.png" class="img-responsive" style="width: 110px;">    </div>    <div class="col-md-10">      <div class="center">        <h3>          Lingaya's Vidyapeeth, Fraidabad<br>          Award Sheet<br>          End Semester Examination<br>          (May-June, 2019)        </h3>      </div>    </div>  </div>在這段代碼中,我只是<div id="print_wrapp">通過(guò)單擊功能在 div 中運(yùn)行打印內(nèi)容,即printDiv它可以正常工作,但問(wèn)題是打印預(yù)覽 css 沒(méi)有正確顯示 div 內(nèi)容,下面提到了圖像:我的原始頁(yè)面如下所示: 那么,我該如何解決這個(gè)問(wèn)題呢?請(qǐng)幫我。
查看完整描述

2 回答

?
九州編程

TA貢獻(xiàn)1785條經(jīng)驗(yàn) 獲得超4個(gè)贊

您也可以使用 media='screen,print' 在打印和屏幕上應(yīng)用樣式表

<link ../bootstrap.min.css' rel='stylesheet' media='screen,print'>

或者

<link ../bootstrap.min.css' rel='stylesheet' media='all'>


查看完整回答
反對(duì) 回復(fù) 2022-06-11
?
慕斯王

TA貢獻(xiàn)1864條經(jīng)驗(yàn) 獲得超2個(gè)贊

當(dāng)我們想在打印頁(yè)面時(shí)應(yīng)用一些樣式時(shí),我們需要使用@media print 來(lái)應(yīng)用樣式。然后只有樣式將適用于 windows 打印功能。


樣式.css


@media print

{

    .center {

        float: left;

        text-align: center;

      }

      .center h3 {

        color: #000;

        font-weight: 600;

      }

      .left {

        font-size: 14px;

        float: left;

        width: 30%;

        color: #000;

      }

      .right {

        font-size: 14px;

        float: right;

        width: 70%;

        color: #000;

      }

}

然后將要打印頁(yè)面的css文件鏈接到樣式。


<link rel="stylesheet" type="text/css" href="Style.css">

在按鈕單擊時(shí)調(diào)用打印函數(shù)


<button onclick="printPage()" class="center">Print</button>


<script>

    function printPage()

    {

        print();

    }

</script>


查看完整回答
反對(duì) 回復(fù) 2022-06-11
  • 2 回答
  • 0 關(guān)注
  • 254 瀏覽

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)