【问题标题】:How to get the view as shown below? [closed]如何获得如下所示的视图? [关闭]
【发布时间】:2012-05-18 10:42:41
【问题描述】:

您好,我正在使用 phonegap 开发一个 android 应用程序,我遇到了一个类似于图片所示的 UI

在图像中,有一堵墙,不同用户的信息被包裹在它周围。我想以这种方式获得一些东西,谁能给我一个想法,如何使用 html 和 css 获得这种 UI。如果我的问题不清楚,我希望我能够解释我需要什么对不起。谢谢。

【问题讨论】:

  • 是的,以前的 UI 不同,但现在这正是我想要的。我想要一些我找不到的东西,你能帮帮我吗?
  • 您可能想删除上一个问题。这个更清晰(不要重复发布)
  • 它是背景图片或使用白色背景的分隔线图片。
  • @PadmaKumar 这不是背景图片
  • 这是什么网站?也许有人使用 Firebug 或类似的东西(比如我)对此感兴趣,想看看它是如何工作的并提供答案。

标签: android css html cordova


【解决方案1】:

正如我之前提到的css3非常强大,只需通过这些demos查看它可以实现的所有功能。其中大部分都可以在 phonegap 中完成,因为 phonegap 与 css3 配合得很好。 jquery 页面转换也会有很大帮助。

【讨论】:

  • 谢谢你,我会通过那些演示。
  • 他不应该接受这个,因为它实际上并没有回答这个问题。 (但是:这些演示太棒了!谢谢!)
【解决方案2】:

我在这里找到了答案:http://net.tutsplus.com/tutorials/html-css-techniques/quick-tip-practical-css-shapes/

虽然这只是一方面,但我认为让它也适用于右侧并不难。

编辑:

我得到它为双方工作:

<!DOCTYPE html>  

<html lang="en">  
<head>  
    <meta charset="utf-8">  
    <title>CSS Shapes</title>  
    <style type="text/css">
        #container {  
            background: #666;  
            margin: auto;  
            width: 500px;  
            height: 700px;  
            padding-top: 30px;  
            font-family: helvetica, arial, sans-serif;  
        }  

        h1 {  
            background: #e3e3e3;
            border-top-left-radius:3px;
            border-top-right-radius:3px;
            border-bottom-right-radius:3px;
            background: -moz-linear-gradient(top, #e3e3e3, #c8c8c8);  
            background: -webkit-gradient(linear, left top, left bottombottom, from(#e3e3e3), to(#c8c8c8));  
            padding: 10px 20px;  
            margin-left: -20px;  
            margin-top: 0;  
            position: relative;  
            width: 100%;  

            -moz-box-shadow: 1px 1px 3px #292929;  
            -webkit-box-shadow: 1px 1px 3px #292929;  
            box-shadow: 1px 1px 3px #292929;  

            color: #454545;  
            text-shadow: 0 1px 0 white;  
        }  

        .arrow {  
            width: 0; height: 0;  
            line-height: 0;  
            border-left: 20px solid transparent;  
            border-top: 10px solid #c8c8c8;  
            top: 104%;  
            left: 0;  
            position: absolute;  
        }  
        .rightArrow {
            width: 0; height: 0;  
            line-height: 0;  
            border-right: 20px solid transparent;  
            border-top: 10px solid #c8c8c8;  
            top: 104%;  
            left: 100%;  
            margin-left:-20px;
            position: absolute;  
        }
    </style>
    <!--[if IE]>  
        <style>  
            .arrow { top: 100%; }  
        </style>  
    <![endif]-->  

</head>  
<body>  
     <div id="container">  

        <h1> My Heading <span class="arrow"></span> <span class="rightArrow"></span></h1>  

    </div>  
</body>  
</html>  

【讨论】:

  • 嘿,谢谢你的回答,这就是我真正想要的
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-02-15
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多