Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 Warning: error_log(/data/www/wwwroot/hmttv.cn/caches/error_log.php): failed to open stream: Permission denied in /data/www/wwwroot/hmttv.cn/phpcms/libs/functions/global.func.php on line 537 亚洲国产精品xo在线观看,亚洲一区二区三区电影,久久久久青草

          整合營(yíng)銷服務(wù)商

          電腦端+手機(jī)端+微信端=數(shù)據(jù)同步管理

          免費(fèi)咨詢熱線:

          利用CSS垂直居中創(chuàng)建網(wǎng)站實(shí)例,求圍觀

          利用CSS垂直居中創(chuàng)建網(wǎng)站實(shí)例,求圍觀

          節(jié)分享了利用css居中的五種方法,現(xiàn)在我們開始創(chuàng)建一個(gè)簡(jiǎn)單但是有趣的網(wǎng)站。最終的樣子是這樣的:

          步驟一

          以語(yǔ)義化標(biāo)簽開始是很好的。下面是我們的頁(yè)面構(gòu)成:

          #floater (to push the content into the middle)

          #centred (the centre box)

          #side

          #logo

          #nav (unordered list <ul>)

          #content

          #bottom (for copyright, etc.)

          這是我用到的 xhtml 代碼:

          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

          <html xmlns="http://www.w3.org/1999/xhtml">

          <head>

          <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

          <title>A Centred Company</title>

          <link rel="stylesheet" href="styles.css" type="text/css" media="all" />

          </head>

          <body>

          <div id="floater"></div>

          <div id="centered">

          <div id="side">

          <div id="logo">

          <strong><span>A</span> Company</strong>

          </div>

          <ul id="nav">

          <li><a href="#">Home</a></li>

          <li><a href="#">Products</a></li>

          <li><a href="#">Blog</a></li>

          <li><a href="#">Contact</a></li>

          <li><a href="#">About</a></li>

          </ul>

          </div>

          <div id="content">

          <h1>Page Title</h1>

          <p>Holisticly re-engineer value-added outsourcing after

          process-centric collaboration and idea-sharing. Energistically

          simplify impactful niche markets via enabled imperatives. Holisticly

          predominate premium innovation after compelling scenarios.

          Seamlessly recaptiualize high standards in human capital with

          leading-edge manufactured products. Distinctively syndicate

          standards compliant schemas before robust vortals. Uniquely

          recaptiualize leveraged web-readiness vis-a-vis out-of-the-box

          information.</p>

          <h2>Heading 2</h2>

          <p>Efficiently embrace customized web-readiness rather than

          customer directed processes. Assertively grow cross-platform

          imperatives vis-a-vis proactive technologies. Conveniently empower

          multidisciplinary meta-services without enterprise-wide interfaces.

          Conveniently streamline competitive strategic theme areas with

          focused e-markets. Phosfluorescently syndicate world-class

          communities vis-a-vis value-added markets. Appropriately reinvent

          holistic services before robust e-services.</p>

          </div>

          </div>

          <div id="bottom">

          <p>Copyright notice goes here</p>

          </div>

          </body>

          </html>

          步驟二:

          現(xiàn)在我們開始用一些基本的 CSS 來給頁(yè)面添加樣式。把以下代碼放入在我們的 html 頁(yè)面頂部被引入的 style.css。

          html, body {

          margin: 0;

          padding: 0;

          height: 100%;

          }

          body {

          background: url('page_bg.jpg') 50% 50% no-repeat #FC3;

          font-family: Georgia, Times, serifs;

          }

          #floater {

          position: relative;

          float: left;

          height: 50%;

          margin-bottom: -200px;

          width: 1px;

          }

          #centered {

          position: relative;

          clear: left;

          height: 400px;

          width: 80%;

          max-width: 800px;

          min-width: 400px;

          margin: 0 auto;

          background: #fff;

          border: 4px solid #666;

          }

          #bottom {

          position: absolute;

          bottom: 0;

          right: 0;

          }

          #nav {

          position: absolute;

          left: 0;

          top: 0;

          bottom: 0;

          right: 70%;

          padding: 20px;

          margin: 10px;

          }

          #content {

          position: absolute;

          left: 30%;

          right: 0;

          top: 0;

          bottom: 0;

          overflow: auto;

          height: 340px;

          padding: 20px;

          margin: 10px;

          }

          #centered {

          -webkit-border-radius: 8px;

          -moz-border-radius: 8px;

          border-radius: 8px;

          }

          h1, h2, h3, h4, h5, h6 {

          font-family: Helvetica, Arial, sans-serif;

          font-weight: normal;

          color: #666;

          }

          h1 {

          color: #f93;

          border-bottom: 1px solid #ddd;

          letter-spacing: -0.05em;

          font-weight: bold;

          margin-top: 0;

          padding-top: 0;

          }

          #bottom {

          padding: 10px;

          font-size: 0.7em;

          color: #f03;

          }

          #logo {

          font-size: 2em;

          text-align: center;

          color: #999;

          }

          #logo strong {

          font-weight: normal;

          }

          #logo span {

          display: block;

          font-size: 4em;

          line-height: 0.7em;

          color: #666;

          }

          p, h2, h3 {

          line-height: 1.6em;

          }

          a {

          color: #f03;

          }

          在我們能夠把 content 垂直居中之前, body 和 html 應(yīng)該被拉伸到 100% 的高度。由于 height

          在 padding 和 margin 之內(nèi),所以我們要把它們?cè)O(shè)成 0 以防止因?yàn)楹苄〉?margin 出現(xiàn)滾動(dòng)條。

          floater 的 margin-bottom 是 content 高度(400px)的一半, -200px。

          現(xiàn)在可以看到一下效果:

          #centred 的寬度為 80%。這可以市網(wǎng)頁(yè)隨著顯示器的大小而變化。一般稱作流體布局。設(shè)置 min-width 和

          max-width 以避免網(wǎng)頁(yè)過大或者過小。 但是 IE 不支持 min/max-width。顯然可以用固定寬度來代替。

          因?yàn)?#centred 是相對(duì)定位的,在它里面我們可以用絕對(duì)定位來定位元素。設(shè)置 #content 的 overflow:auto;

          以避免滾動(dòng)條的出現(xiàn)。IE 不怎么喜歡 overflow:auto; 除非我們指定高度(不是 top 和 bottom 的定位,也不是 %)

          因此我們給它指定高度。

          步驟三

          最后要做的就是再添加點(diǎn)樣式,讓頁(yè)面好看點(diǎn)。從目錄開始吧。

          #nav ul {

          list-style: none;

          padding: 0;

          margin: 20px 0 0 0;

          text-indent: 0;

          }

          #nav li {

          padding: 0;

          margin: 3px;

          }

          #nav li a {

          display: block;

          background-color: #e8e8e8;

          padding: 7px;

          margin: 0;

          text-decoration: none;

          color: #000;

          border-bottom: 1px solid #bbb;

          text-align: right;

          }

          #nav li a::after {

          content: '?';

          color: #aaa;

          font-weight: bold;

          display: inline;

          float: right;

          margin: 0 2px 0 5px;

          }

          #nav li a:hover, #nav li a:focus {

          background: #f8f8f8;

          border-bottom-color: #777;

          }

          #nav li a:hover::after {

          margin: 0 0 0 7px;

          color: #f93;

          }

          #nav li a:active {

          padding: 8px 7px 6px 7px;

          }

          需要注意的是 #centred 的圓角。 CSS3 中,應(yīng)該有 border-radius 屬性來設(shè)定圓角的半徑(可參考 CSS3之旅: border-radius(圓角) – 糖伴西紅柿)。現(xiàn)在的流行的瀏覽器都還不支持,除非用 -moz(Molilla Firefox) 或者 -webit(Safari/Webkit) 前綴.

          水平居中經(jīng)常用,其實(shí)垂直居中也很有用的。平時(shí)用的最多的應(yīng)該是上節(jié)講的方法五了,算是個(gè)小技巧吧。誰(shuí)還有更好的方法嗎,歡迎留言交流。

          evExpress WinForms擁有180+組件和UI庫(kù),能為Windows Forms平臺(tái)創(chuàng)建具有影響力的業(yè)務(wù)解決方案。DevExpress WinForms能完美構(gòu)建流暢、美觀且易于使用的應(yīng)用程序,無論是Office風(fēng)格的界面,還是分析處理大批量的業(yè)務(wù)數(shù)據(jù),它都能輕松勝任!

          DevExpress WinForm 近日正式發(fā)布了2022年第一個(gè)重大版本——v22.1,此版本也正式升級(jí)了之前版本中發(fā)布的HTML CSS模板功能,歡迎下載最新版體驗(yàn)!

          DevExpress WinForms Subscription官方最新版免費(fèi)下載試用,歷史版本下載,在線文檔和幫助文件下載-慧都網(wǎng)

          HTML CSS 模板

          列表框、組合框、警報(bào) - HTML和CSS標(biāo)記支持

          v22.1 為我們的WinForms ListBox、ComboBox和Alert控件引入了 HTML 和 CSS 標(biāo)記支持,使用HtmlTemplates屬性定義可應(yīng)用于項(xiàng)目的HTML-CSS模板集合,閱讀以下文章:

          • DevExpress WinForms的HTML & CSS 模板 — 新控件和功能
          • DevExpress WinForms HTML & CSS模板——輕松創(chuàng)建警報(bào)通知

          處理以下事件以響應(yīng)針對(duì) HTML UI 元素的鼠標(biāo)操作:

          • HtmlElementMouseOver
          • HtmlElementMouseMove
          • HtmlElementMouseOut
          • HtmlElementMouseClick
          • HtmlElementMouseDown
          • HtmlElementMouseUp

          HTML Content控件 - 存儲(chǔ)庫(kù)項(xiàng)的輸入標(biāo)記

          您現(xiàn)在可以將存儲(chǔ)庫(kù)項(xiàng)目包裝在 <input> 標(biāo)記內(nèi)。

          'name' 屬性按名稱引用存儲(chǔ)庫(kù)項(xiàng),'value' 屬性指定數(shù)據(jù)字段名稱。

          HTML

          <div class='default-avatar-container' hidden='${HasPhoto}'>
          <input class='default-avatar' name='pictureEdit' value='${Photo}' />
          <a class='choose-photo' id='choose_Photo'>Choose a photo</a>
          </div>
          <div class='default-avatar-container avatar-container' hidden='${IsDefaultPhoto}'>
          <input class='avatar' name='pictureEdit' value='${Photo}' />
          </div>
          <div class='input-box'>
          <input class='input' name='emailEdit' value='${Email}'/>
          </div>

          我們的Template Designer 在包括'In-place Editor Repository' 選項(xiàng)卡,打開此選項(xiàng)卡來創(chuàng)建要在 HTML 模板中引用的存儲(chǔ)庫(kù)項(xiàng)目。

          HTML模板設(shè)計(jì)器增強(qiáng)

          HTML 模板設(shè)計(jì)器現(xiàn)在附帶以下選項(xiàng):

          • 區(qū)域折疊
          • 縮進(jìn)指南
          • 行號(hào)

          TileView - 項(xiàng)目自動(dòng)高度

          我們添加了一個(gè)新的TileViewOptionsHtmlTemplate.ItemAutoHeight 選項(xiàng)來支持由HTML和基于CSS模板呈現(xiàn)的圖塊的自動(dòng)高度模式,在自動(dòng)高度模式下,磁貼會(huì)垂直拉伸以完全顯示內(nèi)容。

          新的 CSS 屬性

          我們支持以下 CSS 屬性:

          • overflow-wrap
          • white-space
          • background-image
          • background-position
          • background-size
          • background-repeat

          文簡(jiǎn)介

          點(diǎn)贊 + 關(guān)注 + 收藏=學(xué)會(huì)了


          主站蜘蛛池模板: 亚洲国产精品一区第二页 | 一区二区三区视频网站| 在线观看亚洲一区二区| 国产高清一区二区三区视频| 亚洲av午夜福利精品一区人妖| 国产精品亚洲综合一区在线观看| 亚洲成AV人片一区二区| 国精品无码一区二区三区在线蜜臀 | 国产福利91精品一区二区三区| 精品一区二区三区视频在线观看| 久久无码人妻一区二区三区午夜| 国产成人无码AV一区二区| 亚洲毛片不卡av在线播放一区| 濑亚美莉在线视频一区| 日本一道一区二区免费看| 乱子伦一区二区三区| 91在线视频一区| 91一区二区三区四区五区| 亚洲一区二区电影| 亚洲综合一区二区精品导航| 无码国产精成人午夜视频一区二区| 亚洲AV日韩AV天堂一区二区三区| 韩日午夜在线资源一区二区| 国产色精品vr一区区三区| 一区二区三区在线播放视频| 色一情一乱一伦一区二区三区| 精品乱码一区内射人妻无码| 日韩一区二区三区免费体验| 美女AV一区二区三区| 亚洲片一区二区三区| 亚洲人成人一区二区三区| 久久精品一区二区东京热| 亚洲av无码一区二区三区天堂古代| 韩国福利影视一区二区三区| 亚洲欧美国产国产综合一区| 精品一区二区三区中文| 国产在线aaa片一区二区99| 亚洲国产精品一区二区久久| 国产福利一区二区三区在线视频 | 精品无码日韩一区二区三区不卡 | 无码毛片一区二区三区中文字幕 |