昨天我得修复了网站的设计,但知道手机上看起来并不好看。
网站:www.globaltcompany.com
我试图使标题响应,但我没有成真。
索引头代码
<head>
<meta charset="UTF-8">
<!--<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!--<link rel="icon" type="image/png" href="../img/GTC.png" /> -->
<link rel="icon" type="image/png" href="/img/Logo_PageIcon.png" />
<title>Global Trade Company Ltd</title>
<link rel="stylesheet" href="http://fonts.googleapis.com/icon?family=Material+Icons">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,400,500,700" type="text/css">
<link href='https://fonts.googleapis.com/css?family=Dancing+Script:400,700' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Droid+Serif:400,400italic' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="css/style_index.css">
<link rel="stylesheet" href="css/style_menu.css">
<link href="js/flexisel/css/style.css" rel="stylesheet" type="text/css" />
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.7";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/script_general.js"></script>
<script type="text/javascript" src="js/flexisel/js/jquery.flexisel.js"></script>
<script type="text/javascript">
$(window).load(function(){
$(".carga-modal").fadeOut('slow');
$('body').css('overflow', 'scroll');
});
</script>
</head>
Style_menu cc
.contenedor-noticia{
position: relative;
margin-top: 0;
display: block;
max-width: 100%;
height: 120px;
background-size: 100% 100%;
background: url(../img/portada_index1.jpg) no-repeat center bottom;
overflow: hidden;
background-color: #000;}
style_menu ccs @ll媒体代码
@media screen and (max-width:945px) {
.contenedor-noticias{
width:945px;
img{
width: 100%;
max-width: 945px;
}
.title-menu-bar{
display: none;
}
}
@media screen and (max-width:815px) {
.contenedor-noticias{
width:815px;
img{
width: 100%;
max-width: 815px;
}
}
.navegacion{
width: 630px;
margin-right: 40px;
}
.link-menu{
display: block;
padding: 10px;
padding-top: 15px;
}
}
@media screen and (max-width:800px) {
.contenedor-noticias{
width:800px;
img{
width: 100%;
max-width: 800px;
}
}
.btn-menu {
display:block;
color:#fff;
text-decoration:none;
font-weight: bold;
font-size:25px;
float: right;
padding: 14px;
}
.icon-menu{
color: #fff;
}
.main{
top: 10px;
}
.navegacion{
display: none;
}
.navegacion-drawer{
display: block;
width:100%;
height:100%;
left:-100%;
position: fixed;
padding: 0;
top: 58px;
background-color: rgba(15, 15, 15, 0.7);
}
.link-sub-menu-drawer{
background: rgb(34, 34, 34)
}
.menu-general{
width: 80%;
height: 100%;
position: absolute;
background: rgb(14, 14, 14);
left: 0;
overflow-y: scroll;
}
.menu{
display:block;
float:none;
border-bottom:1px solid rgba(255,255,255, .3);
display: block;
width: 100%;
}
.link-menu{
text-align: left;
}
.sub-menu-drawer{
position: relative;
padding: 0;
width: 100%;
top: 100%;
left: 0;
display: none;
list-style: none;
}
.item-submenu-drawer{
padding: 3px;
background: rgb(23, 23, 23);
}
.link-sub-menu-drawer{
height: 37px;
}
.menu:before{
content: "";
display: block;
width: 0;
height: 0;
background: rgb(73, 186, 222);
visibility: hidden;
}
.menu:hover:before{
content: "";
width: 0;
left: 0;
}
.title-menu-bar{
display: block;
}
.text-footer{
font-size: 14px;
}
.text-info-footer{
font-size: 11px;
}
}
@media screen and (max-width:480px) {
.contenedor-noticias{
width:480px;
img{
width: 100%;
max-width: 480px;
}
}
.text-footer{
font-size: 11px;
}
.text-info-footer{
font-size: 9px;
}
}
当我通过手机访问时,标题图片,图片看起来不像是,并且由于某种原因,我在“catalogo”页面上有下一个问题菜单,在顶部而不是在整洁之前页脚。
任何其他sugestions将不胜感激:D
答案 0 :(得分:0)
您可以将flexBox
与img
代码
.contenedor-noticia{
background-color: #000;
display: flex;
justify-content: center;
width: 100%;
}
img.bg {
width: 100%;
height: auto;
/* depends on your image real width */
max-width: 1050px;
}
<div class="contenedor-noticia">
<img src="../img/portada_index1.jpg" class="bg">
</div>