前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >30+有用的CSS代码片段

30+有用的CSS代码片段

原创
作者头像
用户7718188
修改于 2021-11-01 04:16:00
修改于 2021-11-01 04:16:00
51101
代码可运行
举报
文章被收录于专栏:高级工程司高级工程司
运行总次数:1
代码可运行

在一篇文章中收集所有的CSS代码片段几乎是不可能的事情,但是我们这里列出了一些相对于其他的更有用的代码片段,不要被这些代码的长度所吓到,因为它们都很容易实现,并且具有良好的文档。除了那些解决常见的恼人的问题外,也包含了一些解决新问题的新技术。

1. 垂直对齐

如果你之前遇到过这个问题,你就应该知道它是多么的烦人,幸运的是,现在你可以使用CSS3变换来解决这个问题:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
.vc{
    position: relative;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -o-transform: translateY(-50%);
    transform: translateY(-50%);
}

2. 只在一侧或者两侧具有投影

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
.box-shadow {
    background-color: #AC92EC;
    width: 160px;
    height: 90px;
    margin-top: -45px;
    margin-left: -80px;
    position: absolute;
    top: 50%;
    left: 50%;
}
.box-shadow:after {
    content: "";
    width: 150px;
    height: 1px;
    margin-top: 88px;
    margin-left: -75px;
    display: block;
    position: absolute;
    left: 50%;
    z-index: -1;
    -webkit-box-shadow: 0px 0px 8px 2px #000000;
       -moz-box-shadow: 0px 0px 8px 2px #000000;
            box-shadow: 0px 0px 8px 2px #000000;
}

3. 渐变背景动画效果

从CSS3开始,动画变得非常的酷了,但是切不可过分的使用它们。下面这一技巧巧妙地的移动背景位置,使其看起来像动画一样:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
button {
    padding: 15px;
    background-image: linear-gradient(#FC6E51, #FFF);
    background-size: auto 200%;
    background-position: 0 100%;
    transition: background-position 0.5s;
}    
button:hover {
    background-position: 0 0;
}

4. 将文本分成多列

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
div
{
    -moz-column-count:3; /* Firefox */
    -webkit-column-count:3; /* Safari and Chrome */
    column-count:3;
}

5. 表格自动宽度

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
td {
    white-space: nowrap;
}

6. 像出版物一样,第一个字变得大些

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
p:first-child::first-letter{
  font-family: "papyrus";
  font-size: 28px;
  font-weight: bold;
}

7. 特定浏览器的CSS Hacks的完整列表

有时候解决跨浏览器兼容性可能会非常的棘手,但这些特定浏览器的技巧可能会帮你解决问题。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/***** Selector Hacks ******/

/* IE6 and below */
* html #uno  { color: red }

/* IE7 */
*:first-child+html #dos { color: red } 

/* IE7, FF, Saf, Opera  */
html>body #tres { color: red }

/* IE8, FF, Saf, Opera (Everything but IE 6,7) */
html>/**/body #cuatro { color: red }

/* Opera 9.27 and below, safari 2 */
html:first-child #cinco { color: red }

/* Safari 2-3 */
html[xmlns*=""] body:last-child #seis { color: red }

/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:nth-of-type(1) #siete { color: red }

/* safari 3+, chrome 1+, opera9+, ff 3.5+ */
body:first-of-type #ocho {  color: red }

/* saf3+, chrome1+ */
@media screen and (-webkit-min-device-pixel-ratio:0) {
 #diez  { color: red  }
}

/* iPhone / mobile webkit */
@media screen and (max-device-width: 480px) {
 #veintiseis { color: red  }
}


/* Safari 2 - 3.1 */
html[xmlns*=""]:root #trece  { color: red  }

/* Safari 2 - 3.1, Opera 9.25 */
*|html[xmlns*=""] #catorce { color: red  }

/* Everything but IE6-8 */
:root *> #quince { color: red  }

/* IE7 */
*+html #dieciocho {  color: red }

/* Firefox only. 1+ */
#veinticuatro,  x:-moz-any-link  { color: red }

/* Firefox 3.0+ */
#veinticinco,  x:-moz-any-link, x:default  { color: red  }



/***** Attribute Hacks ******/

/* IE6 */
#once { _color: blue }

/* IE6, IE7 */
#doce { *color: blue; /* or #color: blue */ }

/* Everything but IE6 */
#diecisiete { color/**/: blue }

/* IE6, IE7, IE8 */
#diecinueve { color: blue\9; }

/* IE7, IE8 */
#veinte { color/*\**/: blue\9; }

/* IE6, IE7 -- acts as an !important */
#veintesiete { color: blue !ie; } /* string after ! can be anything */

8. 创建模糊文本

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
.blurry-text {
   color: transparent;
   text-shadow: 0 0 5px rgba(0,0,0,0.5);
}

9. 不使用表格实现跨浏览器垂直水平居中图片

这段代码可以在一个已知宽高的容器内垂直水平居中一个未知大小的图片,这是 IE 的一个hack:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<figure class='logo'>
    <span></span>
    <img class='photo'/>
</figure>
.logo {
  display: block;
  text-align: center;
  display: block;
  text-align: center;
  vertical-align: middle;
  border: 4px solid #dddddd;
  padding: 4px;
  height: 74px;
  width: 74px; }
  .logo * {
    display: inline-block;
    height: 100%;
    vertical-align: middle; }
    .logo .photo {
    height: auto;
    width: auto;
    max-width: 100%;
    max-height: 100%; }

10. 高亮选中的 input

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
// HTML
<input id="mycheck1" type="checkbox" />
<label for="mycheck1">Check box label here</label>
<br />
<input id="mycheck2" type="checkbox" checked/>
<label for="mycheck2">Check box label here</label>
<br />
<input id="mycheck3" type="checkbox" />
<label for="mycheck3">Check box label here</label>

// CSS
input:checked + label{
    background: yellow;  
}

11. 跨浏览器透明度

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
selector {
    filter: alpha(opacity=50); /* internet explorer */
    -khtml-opacity: 0.5;      /* khtml, old safari */
    -moz-opacity: 0.5;       /* mozilla, netscape */
    opacity: 0.5;           /* fx, safari, opera */
}

12. CSS投影

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
// 外投影
.shadow {
  -moz-box-shadow: 5px 5px 5px #ccc;
  -webkit-box-shadow: 5px 5px 5px #ccc;
  box-shadow: 5px 5px 5px #ccc;
}

// 内投影
.shadow {
   -moz-box-shadow:inset 0 0 10px #000000;
   -webkit-box-shadow:inset 0 0 10px #000000;
   box-shadow:inset 0 0 10px #000000;
}

13. 跨浏览器最小高度

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#div {
   min-height: 500px;
   height:auto !important;
   height: 500px;
}

14. 固定 Footer

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#footer {
   position:fixed;
   left:0px;
   bottom:0px;
   height:30px;
   width:100%;
   background:#999;
}

/* IE 6 */
* html #footer {
   position:absolute;
   top:expression((0-(footer.offsetHeight)+(document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight)+(ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop))+'px');
}

15. 清除浮动 Clearfix

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/* slightly enhanced, universal clearfix hack */
.clearfix:after {
     visibility: hidden;
     display: block;
     font-size: 0;
     content: " ";
     clear: both;
     height: 0;
     }
.clearfix { display: inline-block; }
/* start commented backslash hack \*/
* html .clearfix { height: 1%; }
.clearfix { display: block; }
/* close commented backslash hack */

16. 给可点击元素添加手型光标

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
a[href], input[type='submit'], input[type='image'], label[for], select, button, .pointer {
       cursor: pointer;
}

17. iPad 定向CSS

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!-- css -->
@media only screen and (max-device-width: 1024px) and (orientation:portrait) { 
    .landscape { display: none; }
}
@media only screen and (max-device-width: 1024px) and (orientation:landscape) { 
    .portrait { display: none; }
}

<!-- example markup -->
<h1 class="portrait">Your device orientation is "portrait"<h1>
<h1 class="landscape">Your device orientation is "landscape"<h1>

18. Pre 标签内文本换行

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
pre{
height: 120px;
overflow: auto;
font-family: “Consolas”,monospace;
font-size: 9pt;
text-align:left;
background-color: #FCF7EC;
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */
word-wrap: break-word; /* Internet Explorer 5.5+ */
margin: 0px 0px 0px 0px;
padding:5px 5px 3px 5px;
white-space : normal; /* crucial for IE 6, maybe 7? */
}

19. CSS3媒体查询

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px) 
and (max-device-width : 480px) {
/* Styles */
}

/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {
/* Styles */
}

/* Smartphones (portrait) ----------- */
@media only screen
and (max-width : 320px) {
/* Styles */
}

/* iPads (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 768px) 
and (max-device-width : 1024px) {
/* Styles */
}

/* iPads (landscape) ----------- */
@media only screen
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : landscape) {
/* Styles */
}

/* iPads (portrait) ----------- */
@media only screen
and (min-device-width : 768px) 
and (max-device-width : 1024px) 
and (orientation : portrait) {
/* Styles */
}

/* Desktops and laptops ----------- */
@media only screen
and (min-width : 1224px) {
/* Styles */
}

/* Large screens ----------- */
@media only screen
and (min-width : 1824px) {
/* Styles */
}

/* iPhone 4 ----------- */
@media
only screen and (-webkit-min-device-pixel-ratio : 1.5),
only screen and (min-device-pixel-ratio : 1.5) {
/* Styles */
}

20. 重置加载

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    font-weight: inherit;
    font-style: inherit;
    font-size: 100%;
    font-family: inherit;
    vertical-align: baseline;
}
/* remember to define focus styles! */
:focus {
    outline: 0;
}
body {
    line-height: 1;
    color: black;
    background: white;
}
ol, ul {
    list-style: none;
}
/* tables still need 'cellspacing="0"' in the markup */
table {
    border-collapse: separate;
    border-spacing: 0;
}
caption, th, td {
    text-align: left;
    font-weight: normal;
}
blockquote:before, blockquote:after,
q:before, q:after {
    content: "";
}
blockquote, q {
    quotes: "" "";
}

21. 多边框

元素必须是相对定位,且具有足够的padding来显示多余的边框:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#borders {
   position:relative;
   z-index:1;
   padding:30px;
   border:5px solid #f00;
   background:#ff9600;
}
#borders:before {
   content:"";
   position:absolute;
   z-index:-1;
   top:5px;
   left:5px;
   right:5px;
   bottom:5px;
   border:5px solid #ffea00;
   background:#4aa929;
}

#borders:after {
   content:"";
   position:absolute;
   z-index:-1;
   top:15px;
   left:15px;
   right:15px;
   bottom:15px;
   border:5px solid #00b4ff;
   background:#fff;
}

22. 移除IE中textarea的滚动条

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
textarea { overflow: auto; }

23. 简单但好看的引用样式

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
blockquote {
    background:#f9f9f9;
    border-left:10px solid #ccc;
    margin:1.5em 10px;
    padding:.5em 10px;
    quotes:"\201C""\201D""\2018""\2019";
}
blockquote:before {
    color:#ccc;
    content:open-quote;
    font-size:4em;
    line-height:.1em;
    margin-right:.25em;
    vertical-align:-.4em;
}
blockquote p {
    display:inline;
}

24. :-moz-placeholder

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
<!doctype html>
<html>
<head>
  <title>Placeholder demo</title>
  <style type="text/css">
    input:-moz-placeholder {
      color: green;
    }
  </style>
</head>
<body>
  <input id="test" placeholder="Placeholder text!">
</body>
</html>

25. 另一种固定footer的方式

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
* { margin:0; padding:0; } 

html, body, #wrap { height: 100%; }

body > #wrap {height: auto; min-height: 100%;}

#main { padding-bottom: 150px; }  /* must be same height as the footer */

#footer {
        position: relative;
        margin-top: -150px; /* negative value of footer height */
        height: 150px;
        clear:both;} 

/* CLEAR FIX*/
.clearfix:after {content: ".";
        display: block;
        height: 0;
        clear: both;
        visibility: hidden;}
.clearfix {display: inline-block;}
/* Hides from IE-mac \*/
* html .clearfix { height: 1%;}
.clearfix {display: block;}
/* End hide from IE-mac */
<div id="wrap">

        <div id="main" class="clearfix">

        </div>

</div>

<div id="footer">

</div>

26. 背景透明

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
.rgba {
  background-color: transparent;
  background-color: rgba(200,200,200,0.8);
  filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99dddddd,endColorstr=#99dddddd);
  -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#99dddddd,endColorstr=#99dddddd)";
}

27. 居中未知宽度的DIV元素

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
.content {
    margin: 0 auto 8px;
    display: table;
    }

.content div {
    display: table-cell;
    }

<!--[if IE]>
.content {
    display: block;
    text-align: center;
    }
.content div {
    display: inline;
    zoom: 1;
}
<![endif]-->

28. 根据文件类型设置样式

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/* external links */
a[href^="http://"]
{
padding-right: 13px;
background: url(external.gif) no-repeat center right;
}

/* emails */
a[href^="mailto:"]
{
padding-right: 20px;
background: url(email.png) no-repeat center right;
}

/* pdfs */
a[href$=".pdf"]
{
padding-right: 18px;
background: url(acrobat.png) no-repeat center right;
}

29. 解决IE6/7双倍margin/padding问题

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ul li
{
  float: right;
  margin-right: 10px;
  *display: inline; /*Target IE7 and bellow*/
  _display: inline; /*Target IE6 and bellow*/
}
/* This example fixes the double right margin bug */

30. 更改选中文本的样式

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
::selection
{
color: white;
background-color: red;
}

::-moz-selection  /* Firefox needs an extra attention for this */
{
color: white;
background-color: red;
} 

31. 首字下沉

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
p:first-letter{
        display:block;
        margin:5px 0 0 5px;
        float:left;
        color:#FF3366;
        font-size:60px;
        font-family:Georgia;
    }

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
暂无评论
推荐阅读
Intel 虚拟化技术(Intel® VT):CPU 虚拟化与内存虚拟化
目前主要的 CPU 虚拟化技术是 Intel 的 VT-x/VT-i 和 AMD 的 AMD-V 这两种技术。
Flowlet
2023/08/11
3.8K0
Intel 虚拟化技术(Intel® VT):CPU 虚拟化与内存虚拟化
【Windows】基于Hyper-V安装Ubuntu虚拟机
Hyper-V 是一种由 Microsoft 开发的虚拟化技术和虚拟化平台。它是 Windows 操作系统的一部分,并提供了在主机操作系统上运行多个虚拟机的能力。
DevFrank
2024/07/24
3920
【Windows】基于Hyper-V安装Ubuntu虚拟机
Docker Vs. 虚拟机
在计算机技术中,虚拟化(Virtualization)是一种资源管理技术。它是将计算机的各种实体资源,如:服务器、网络、内存及存储等,予以抽象、转换后呈现出来,打破实体结构间的不可切割的障碍,使用户可以用更好的方式来利用这些资源。
鲁大猿
2024/01/25
2980
Docker Vs. 虚拟机
Windows: 使用PowerShell管理Hyper-V虚拟机
Hyper-V是Windows操作系统中强大的虚拟化平台,通过Hyper-V,用户可以创建和管理虚拟机(VM)。作为计算机专业人士,我们可能更倾向于使用命令行工具来高效地管理系统。在Windows上,PowerShell是一个功能强大的命令行工具,可以用来管理Hyper-V虚拟机。本文将详细介绍如何使用PowerShell管理Hyper-V虚拟机,包括创建、配置、启动和监控虚拟机。
运维开发王义杰
2024/06/14
5190
Windows: 使用PowerShell管理Hyper-V虚拟机
安装Hyper-V创建虚拟机
使用提升的用户权限打开 Windows PowerShell 会话。为此,请单击 Windows开始按钮并键入PowerShell。右键单击PowerShell,然后单击以管理员身份运行。
闲花手札
2023/10/17
5610
安装Hyper-V创建虚拟机
Hyper-V导致VmWare无法启动虚拟机的问题
问题原因: 由于Windows 10启用Hyper-V技术后,可以在 Windows 上以虚拟机形式运行多个操作系统。
云叶知秋
2021/12/06
3.2K0
Hyper-V导致VmWare无法启动虚拟机的问题
Windows 10 使用 Hyper-V 和 Vagrant 创建虚拟机环境
以前我都是用 Vagrant + VirtualBox 快速创建虚拟机环境。通过 Vagrant 配置文件,我们可以快速初始化多个关联的虚拟机,并省去了设置网络和存储的时间。还可以将 Vagrant 项目直接转给别人,让别人快速搭建类似的环境。用了 Kubernetes Desktop 后,需要开启 Windows 的 Hyper-V,这样就无法使用 VirtualBox 了。所以,为了同时使用 Kubernetes 和虚拟化,使用 Hyper-V 代替 VirtualBox会是一个自然的选择。不过目前 Vagrant 还不支持 Hyper-V 网络初始化,所以要有需要自定义的步骤。
云云众生s
2024/03/27
5920
XEN、VMware ESXi、Hyper-V以及KVM架构解析
XEN 有简化虚拟模式,不需要设备驱动,能够保证每个虚拟用户系统相互独立,依赖于 service domains 来完成一些功能; Vmware ESXI 与 XEN 比较类似,包含设备驱动以及管理栈
CSDN技术头条
2018/02/09
11K1
XEN、VMware ESXi、Hyper-V以及KVM架构解析
VMM分类_nmm组合
VMM虚拟的是现实存在的平台,在客户及操作系统看来,虚拟的平台和现实的平台是一样的,客户机操作系统察觉不到市运行在一个虚拟平台上X86架构的完全虚拟化,经历了两个阶段:
全栈程序员站长
2022/11/09
8750
VMM分类_nmm组合
【Linux环境搭建实战手册】:打造高效开发空间的秘籍
请注意,这些只是一般的建议要求,实际的设备要求可能会根据所选的Linux发行版、用途和应用程序的不同而有所变化。一些特殊用途的应用可能需要更高的性能和配置要求。
爱喝兽奶的熊孩子
2024/05/29
1140
【Linux环境搭建实战手册】:打造高效开发空间的秘籍
容器和虚拟机到底有啥区别?
Docker这几年的迅猛发展让容器重新流行起来,不过但很多资料里介绍Docker时都说是 "新瓶装旧酒"。除了容器外虚拟机也是我们或多或少会接触到的虚拟化技术。虚拟机和容器都用于创建隔离的虚拟环境,但是这两种虚拟化技术有显著的不同,今天的文章就来聊一下它们之间的区别。
KevinYan
2020/07/10
1.6K0
最强虚拟机 VMware 17 来了!附安装教程
虚拟机(Virtual Machine)指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。在实体计算机中能够完成的工作在虚拟机中都能够实现。在计算机中创建虚拟机时,需要将实体机的部分硬盘和内存容量作为虚拟机的硬盘和内存容量。每个虚拟机都有独立的CMOS、硬盘和操作系统,可以像使用实体机一样对虚拟机进行操作。
民工哥
2023/10/13
3.2K0
最强虚拟机 VMware 17 来了!附安装教程
最好用的六款虚拟机软件
说起虚拟机,相信作为技术人员的小伙伴们不会感到陌生。虚拟机的使用场景非常多,如搭建测试环境、在Windows系统中安装Linux或在Mac机器上运行Windows系统、甚至还可以用来进行安全实验。
西岸Alex
2023/01/05
6K0
最好用的六款虚拟机软件
VMware虚拟机下载与安装教程(详细步骤-图文结合)Vm虚拟机+安装包
VMware虚拟机是一种在主机操作系统上创建虚拟机的软件。通过VMware虚拟机,用户可以在一台计算机上运行多个虚拟计算机,并且每个虚拟计算机都具有自己的操作系统和应用程序,就像它们在单独的计算机上运行一样。
用户10519170
2023/04/21
1.7K0
Hypervisor, KVM, QEMU总结
Hypervisor——一种运行在基础物理服务器和操作系统之间的中间软件层,可允许多个操作系统和应用共享硬件。也可叫做VMM( virtual machine monitor ),即虚拟机监视器。
战神伽罗
2019/07/24
11.1K1
Hypervisor, KVM, QEMU总结
虚拟化分类与 I/O 虚拟化技术概述
虚拟化技术是实现云计算的基石,虚拟化技术主要由三项关键技术构成:CPU 虚拟化、内存虚拟化和 I/O 虚拟化。I/O 虚拟化作为计算、网络与存储的技术交织点,其重要性与复杂性不言而喻。
通信行业搬砖工
2023/09/06
7560
虚拟化分类与 I/O 虚拟化技术概述
虚拟机&容器技术 原
近期无意间看到这样一则消息“LinuxCon+ContainerCon+CloudOpen中国大会在北京成功举办”,初学Linux的小白在使用着虚拟机进行一系列操作,Container的出现让我产生了好奇心,今天看到一篇关于容器的文章,稍作整理,跟大家分享一下:
阿dai学长
2019/04/03
6330
虚拟机&容器技术
                                                                            原
XenApp 规划指南:虚拟化最佳实践
桌面虚拟化包含有很多不同的虚拟桌面。其中一项是采用主机共享的模式,发布的桌面包含在Citrix XenApp服务器中。
SuperDream
2019/02/28
1.5K0
XenApp 规划指南:虚拟化最佳实践
虚拟化技术(1)——介绍
什么是虚拟化 虚拟化是指计算机元件在虚拟的基础上而不是真实的基础上运行。虚拟化技术可以扩大硬件的容量,简化软件的重新配置过程。CPU的虚拟化技术可以单CPU模拟多CPU并行,允许一个平台同时运行多个操作系统,并且应用程序都可以在相互独立的空间内运行而互不影响,从而显著提高计算机的工作效率。 几种虚拟化软件介绍 RedHat KVM 虚拟化方式:完全虚拟化 架构:寄居架构(linux内核);祼金属架构RHEV-H 特点:祼金属架构RHEV-H或在关键的硬盘和网卡上支持半虚拟化VirtIO,达到最佳性能。 I/
cloudskyme
2018/03/20
1.9K0
虚拟化技术(1)——介绍
虚拟化技术概述
虚拟化简单讲,就是把一台物理计算机虚拟成多台逻辑计算机,每个逻辑计算机里面可以运行不同的操作系统,相互不受影响,每个逻辑系统都是独立的存在,这样就可以充分利用物理硬件的资源,而且还可以自由分配资源。
端碗吹水
2020/09/23
2.4K0
虚拟化技术概述
推荐阅读
相关推荐
Intel 虚拟化技术(Intel® VT):CPU 虚拟化与内存虚拟化
更多 >
LV.1
公众号:民工哥技术之路
目录
  • 1. 垂直对齐
  • 2. 只在一侧或者两侧具有投影
  • 3. 渐变背景动画效果
  • 4. 将文本分成多列
  • 5. 表格自动宽度
  • 6. 像出版物一样,第一个字变得大些
  • 7. 特定浏览器的CSS Hacks的完整列表
  • 8. 创建模糊文本
  • 9. 不使用表格实现跨浏览器垂直水平居中图片
  • 10. 高亮选中的 input
  • 11. 跨浏览器透明度
  • 12. CSS投影
  • 13. 跨浏览器最小高度
  • 14. 固定 Footer
  • 15. 清除浮动 Clearfix
  • 16. 给可点击元素添加手型光标
  • 17. iPad 定向CSS
  • 18. Pre 标签内文本换行
  • 19. CSS3媒体查询
  • 20. 重置加载
  • 21. 多边框
  • 22. 移除IE中textarea的滚动条
  • 23. 简单但好看的引用样式
  • 24. :-moz-placeholder
  • 25. 另一种固定footer的方式
  • 26. 背景透明
  • 27. 居中未知宽度的DIV元素
  • 28. 根据文件类型设置样式
  • 29. 解决IE6/7双倍margin/padding问题
  • 30. 更改选中文本的样式
  • 31. 首字下沉
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档