English 中文(简体)
我怎么能确保我在网络浏览器窗口中的内容完全一致?
原标题:How can I ensure that my CSS content fits perfectly within the web browser window?

我怎么能确保我在网络浏览器窗口中的内容完全一致?

我会遇到一个问题,即其内容涉及Width 1917.00x Height 850.00,超出了我的手提电脑 Chrome子窗的界限,要求我浏览。 有趣的是,在同一模型和浏览器的另一种手提电脑上,内容完全适合不需要加薪。

为了减轻这种情况,我注意到,将手提电脑浏览器的中流体浓度水平降低到75%,会解决这个问题,使内容在窗户内融为一体,而无需施压。

Now, my question is: where in the CSS can I adjust the size to 75% universally, ensuring that the content fits perfectly within the browser window on every laptop model? My primary objective is to display the content fully without necessitating the use of a scrollbar.

我也不想让纽芬兰文体的尺寸缩小。

这里是我的科斯·科民阵:

body {
  background-color: #fefff4;
  background-image: linear-gradient(#fefff4, #fefff4);
  margin: 0;
}

#bannerPx {
  padding: 0;
}

/* Banner Wrapper */
#banner {
  position: relative;
  top: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  height: 40px;
  z-index: 10;
  background-color: #4fb3ff;
}

/* Banner Text */
#banner_text {
  text-align: center;
  font: bold 36px Century Gothic;
  color: #000000;
  z-index: 11;
  margin-left: 60px;
  margin-right: 60px;
}

#banner_text2 {
  margin-left: 20px;
}

#bannerimg {
  height: 100%;
}

#bannerIncludePx {
  height: 100%;
  position: relative;
}

#content {
  overflow: hidden;
  z-index: 9999;
  width: 1917px; 
  height: 870px;
}

#content iframe {
  margin: 0;
  padding: 0;
  width: 1917px;
  height: 870px;
  z-index: 300;
  background-color: #fefff4;
}

#console {
  height: 150px;
  margin-top: 0px;
  overflow: auto;
}

#console iframe {
  width: 100;%
  z-index: 200;
}

nav {
  margin: 0px 0px auto;
  position: relative;
  z-index: 2;
}

ul li img {
  margin-left: -20px;
  padding-right: 10px;
  vertical-align: middle;
}

#ci_wrapper {
  margin: 0 auto;
  width: 1917px;
  padding: 8px;
}

#menu,
#menu ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

#menu {
  margin: 0;
  padding: 0;
  background-color: #4fb3ff;
  border-radius: 0;
  box-shadow: 0 1px 1px #777;
  position: relative;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1;
}

#menu:before,
#menu:after {
    content: "";
    display: table;
}

#menu:after {
    clear: both;
}

#menu {
    zoom:1;
}

#menu li {
    float: left;
    position: relative;
}


#menu a {
    float: left;
    padding: 10px 30px;
    color: #212121;
    text-transform: none;
    font: bold 15px Segoe UI;
    text-decoration: none;
}

#menu li:hover > a {
    color: #000000;
    background-image: linear-gradient(#4fb3ff, #4fb3ff);
}

#menu li:hover > a svg {
    transform: rotate(180deg);
}

*html #menu li a:hover { /* IE6 only */
    color: #b6c3d4;
}

#menu ul {
    margin: 20px 0 0 0;
    _margin: 0; /*IE6 only*/
    opacity: 0;
    visibility: hidden;
    position: absolute;
    top: 41px;
    left: 0;
    z-index: 1;    
    background: #FFFFFF;   
    background: linear-gradient(#FFFFFF, #FFFFFF);
    box-shadow: 20px 20px 50px grey;   
    border-radius: 0px;
    transition: all .5s ease-in-out;
}

#menu li:hover > ul {
    opacity: 1;
    visibility: visible;
    margin: 0;
}

#menu ul ul {
    top: 0;
    left: 100%;
    margin: 0 0 0 20px;
    _margin: 0; /*IE6 only*/
    box-shadow: -1px 0 0 rgba(255,255,255,.3);      
}

#menu ul li {
    float: none;
    display: block;
    border: 0;
    _line-height: 0; /*IE6 only*/
    box-shadow: 0 0px 0 #111, 0 0px 0 #666;
}

#menu ul li:last-child {   
    box-shadow: none;    
}

#menu ul a {    
    padding: 10px 25px;
    _height: 10px; /*IE6 only*/
    display: block;
    white-space: nowrap;
    float: none;
    text-transform: none;
}

#menu ul a:hover {
    background-image: linear-gradient(#0095ff, #0095ff);
    color : #000000;
    font-size :14.5px;
}
#menu li a:hover {
    background-image: linear-gradient(#0095ff, #0095ff);
    color : #000000;
}

#menu ul li:first-child > a {
    border-radius: 0px 0px 0 0;
}

#menu ul li:first-child > a:after {
    content:   ;
    position: absolute;
    left: 40px;
    top: -6px;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #FFFFFF;
}

#menu ul ul li:first-child a:after {
    left: -6px;
    top: 50%;
    margin-top: -6px;
    border-left: 0; 
    border-bottom: 6px solid transparent;
    border-top: 6px solid transparent;
    border-right: 6px solid #FFFFFF;
}

#menu ul li:first-child a:hover:after {
}

#menu ul ul li:first-child a:hover:after {
    border-right-color: #424242; 
    border-bottom-color: transparent;   
}

#menu ul li:last-child > a {
    border-radius: 0 0 0px 0px;
}

/* Mobile */
#menu-trigger {
    display: none;
}

@media screen and (max-width: 600px) {

    #menu-wrap {
        position: relative;
    }

    #menu-wrap * {
        box-sizing: border-box;
    }

    #menu-trigger {
        display: block;
        height: 40px;
        line-height: 40px;
        cursor: pointer;        
        padding: 0 0 0 35px;
        border: 1px solid #BDBDBD;
        color: #9E9E9E;
        font-weight: bold;
        background-color: #fff;
        background: url(data:image/png;base64,iVBOR...) no-repeat 10px center, linear-gradient(#BDBDBD, #111);
        border-radius: 6px;
        box-shadow: 0 1px 1px #777, 0 1px 0 #666 inset;
    }

    #menu {
        margin: 0; padding: 10px;
        position: absolute;
        top: 40px;
        width: 100%;
        z-index: 1;
        display: none;
        box-shadow: none;       
    }

    #menu:after {
        content:   ;
        position: absolute;
        left: 25px;
        top: -8px;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-bottom: 8px solid #BDBDBD;
    }   

    #menu ul {
        position: static;
        visibility: visible;
        opacity: 1;
        margin: 0;
        background: none;
        box-shadow: none;               
    }

    #menu ul ul {
        margin: 0 0 0 20px !important;
        box-shadow: none;       
    }

    #menu li {
        position: static;
        display: block;
        float: none;
        border: 0;
        margin: 5px;
        box-shadow: none;           
    }

    #menu ul li{
        margin-left: 20px;
        box-shadow: none;       
    }

    #menu a{
        display: block;
        float: none;
        padding: 0;
        color: #212121;
    }

    #menu a:hover{
        color: #9E9E9E;
    }   

    #menu ul a{
        padding: 0;
        width: auto;        
    }

    #menu ul a:hover{
        background: none;   
    }

    #menu ul li:first-child a:after,
    #menu ul ul li:first-child a:after {
        border: 0;
    }    

}

@media screen and (min-width: 600px) {
    #menu {
        display: block !important;
    }
}   

/* iPad */
.no-transition {
    transition: none;
    opacity: 1;
    visibility: visible;
    display: none;          
}

#menu li:hover > .no-transition {
    display: block;
    background-color: #b6c3d4;
}
svg {
    transition: transform 0.5s ease;
    overflow: hidden;
}
#menu li a img {
    float: left;
}
问题回答

在您的“超文本”中,在<代码>标题/代码>上添加“密码>:

<meta name="viewport" content="width=device-width, initial-scale=1.0">

这应当让浏览器知道如何根据该装置的宽度扩大你的网页。

为了在不进行滚动的情况下完全在浏览器窗户内确保主食内容,你可以使用 v。 适用以下《社会保障法》规则,以达到预期内容:

body {
  font-size: 75vw;
}
 button{
font-size: 75px;
}




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签