wandou

css:

*{
    margin:0;
    padding:0;
}
a, html {
    -webkit-tap-highlight-color: transparent;
}
a {
    color: #000;
    text-decoration: none;
}
img, input {
    vertical-align: middle;
}

img {
    border: 0;
}
.goods-one{
    position: relative;
    margin: .3rem 0;
    padding: 0 .2rem;
    color: #e3e3e3;
}
.goods-one-left:before {
top: -.3rem;
}
.goods-one-left:after, .goods-one-left:before {
    position: absolute;
    content: "";
    height: .3rem;
    left: 0;
    width: 100%;
    background-color: currentColor;
}
.goods-one-left-top {
    position: relative;
    overflow: hidden;
    padding: .3rem .2rem;
    background: #fff;
    min-height: 2.65rem;
}
.goods-one-left-inner-l-box {
    position: absolute;
    left: .2rem;
    width: 2.6rem;
    height: 2.6rem;
    line-height: 2.6rem;
    top: 50%;
    margin-top: -1.3rem;
    overflow: hidden;
}
.goods-one-left-inner-l-box img {
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
}

.goods-one-left-inner-r-box {
    position: relative;
    margin-left: 2.8rem;
    overflow: hidden;
}
.goods-one-left-inner-r-box h2 {
    position: relative;
    overflow: hidden;
    max-height: .8rem;
    line-height: .38rem;
    font-size: .28rem;
    color: #000;
    text-align: center;
    margin-bottom: .2rem;
    text-align: left;
    word-break: break-all;
    font-weight: 400;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.goods-one-left-inner-r-box p {
    position: relative;
    font-size: .24rem;
    color: #9e9e9e;
    word-break: break-all;
    overflow: hidden;
    min-height: .96rem;
    margin-bottom: .9rem;
}
.goods-one-left-price-box {
    position: absolute;
    text-align: left;
    font-size: .24rem;
    color: #d61718;
    left: 0;
    width: 100%;
    bottom: 0;
}
.goods-one-left-price {
    font-size: .32rem;
}
.goods-one-left-price-box small {
    color: #000;
    font-size: .28rem;
    margin: 0 .1rem;
}
.goods-one-left-btm {
    height: .7rem;
    line-height: .7rem;
    color: #fff;
    text-align: center;
    border: 1px solid #d61718;
    font-size: .3rem;
    background-color:#d61718;
}

html:

<section class="goods-one">
    <a href="jgos://goods/@Model.id/@Model.name">
        <div class="goods-one-left-top" style="display:flex;vertical-align:center;justify-content:center;">
            <div class="goods-one-left-inner-l-box">
                <img id="good_img" src='' alt=''>
            </div>
            <div class="goods-one-left-inner-r-box">
                <h2>@Model.name</h2>
                <p>@Model.description</p>
                <div class="goods-one-left-price-box">
                    <span class="goods-one-left-price">@Model.jprice 円</span>
                    <small>约 @(String.Format("{0}", Math.Ceiling(Convert.ToInt32(Model.jprice) * ViewBag.JP2CN)))元</small>
                </div>
            </div>
        </div>
        <div class="goods-one-left-btm">
            点击进入
        </div>
    </a>
</section>

热评文章