简体   繁体   English

移动网站上的CSS问题

[英]CSS Issue on Mobile Site

I have a site that I am working on at http://wpmend.com . 我的网站正在http://wpmend.com上 The site looks ok on desktop but on Mobile well, I think my custom CSS has messed it up. 该网站在桌面设备上看起来还不错,但在移动设备上很好,我想我的自定义CSS搞砸了它。 You'll see that the text and button on the homepage section don't look right, and in the Request a Job section, the buttons for the first two job types don't show up at all. 您会看到主页部分上的文本和按钮看起来不正确,并且在“请求任务”部分中,前两种任务类型的按钮根本没有显示。

I have searched this site and found similar issues and fixes but none that have addressed my exact problem. 我搜索了该站点,发现了类似的问题和解决方法,但是都没有解决我的确切问题。 Please advise on how I can fix the look on the mobile site. 请告知如何在移动网站上修复外观。 By the way, it's a Wordpress site using the Rapid theme. 顺便说一下,这是一个使用Rapid主题的Wordpress网站。

Thanks in advance! 提前致谢!

Scott. 斯科特

Maybe you're good working with a media query for CSS3. 也许您很好使用CSS3的媒体查询。

Add this code to your CSS for the page, where #container is the object that wraps the button at the top. 将此代码添加到页面的CSS中,其中#container是将按钮包装在顶部的对象。

@media screen and (max-device-width:480px){
    #container: margin-top:15px;
}

This will implement this CSS code when the device width is smaller than 480px. 当设备宽度小于480px时,将实现此CSS代码。 It'll move your container below your header down a little bit. 它将使您的标头下方的容器稍微向下移动。

Note: not all mobile devices are smaller than 480px, you'll have to implement multiple media queries for specific devices. 注意:并非所有移动设备都小于480像素,您必须对特定设备实施多个媒体查询。 Refer to: https://css-tricks.com/snippets/css/media-queries-for-standard-devices/ 请参阅: https : //css-tricks.com/snippets/css/media-queries-for-standard-devices/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM