Harmony OS FA-JS

HUAWEI_Engineer
发布于 2021-10-25 21:55
浏览
0收藏

JS-开发app
index/index.hml
Harmony OS FA-JS-鸿蒙开发者社区
index/index.js
Harmony OS FA-JS-鸿蒙开发者社区
效果图:
Harmony OS FA-JS-鸿蒙开发者社区
index/index.css
.container {
flex-direction: column;
}
/* tv */
@media screen and (device-type: tv) {
.title {
align-items:flex-start;
flex-direction: column;
padding-left: 60px;
padding-right: 160px;
margin-top:15px;
}

.name {
    font-size: 20px;
}

.sub-title {
    font-size: 15px;
    color: #7a787d;
    margin-top: 10px;
}

.swiper-style {
    height: 300px;
    width: 350px;
    indicator-color: #4682b4;
    indicator-selected-color: #f0e68c;
    indicator-size: 10px;
    margin-left: 50px;
}

.image-mode {
    object-fit: contain;
}

.selection-bar {
    flex-direction: row;
    align-content: center;
    margin-top: 20px;
    margin-left: 10px;
}

.option-mode {
    height: 40px;
    width: 40px;
    margin-left: 50px;
    opacity: 0.5;
    border-radius: 20px;
}

.option-mode:focus {
    opacity: 1;
}

.description-first-paragraph {
    padding-left: 60px;
    padding-right: 60px;
    padding-top: 30px;
}

.description {
    color: #7a787d;
    font-size: 15px;
}

.cart {
    padding-left: 60px;
    margin-top: 30px;
}

.cart-text {
    font-size: 20px;
    text-align: center;
    width: 300px;
    height: 50px;
    background-color: #6495ed;
    color: white;
}

.cart-text-focus {
    font-size: 20px;
    text-align: center;
    width: 300px;
    height: 50px;
    background-color: #4169e1;
    color: white;
}

.add-cart-text {
    font-size: 20px;
    text-align: center;
    width: 300px;
    height: 50px;
    background-color: #ffd700;
    color: white;
}

}

/* phone */
@media screen and (device-type: phone) {
.title {
align-items:flex-start;
flex-direction: column;
padding-left: 60px;
padding-right: 160px;
padding-top: 20px;
}

.name {
    font-size: 50px;
    color: #000000;
}

.sub-title {
    font-size: 30px;
    color: #7a787d;
    margin-top: 10px;
}

.display-style {
    flex-direction: column;
    align-items:center;
}

.swiper-style {
    height: 600px;
    indicator-color: #4682b4;
    indicator-selected-color: #ffffff;
    indicator-size: 20px;
    margin-top: 15px;
}

.image-mode {
    object-fit: contain;
}

.selection-bar-container {
    height: 90px;
    justify-content: center;
}

.selection-bar {
    height: 90px;
    width: 500px;
    margin-top: 30px;
    justify-content: center;
    align-items:center;
}

.option-mode {
    object-fit: contain;
    opacity: 0.5;
}

.option-mode:active {
    opacity: 1;
}

.description {
    color: #7a787d;
}

.description-first-paragraph {
    padding-left: 60px;
    padding-top: 50px;
    padding-right: 60px;
}

.color-column {
    flex-direction: row;
    align-content: center;
    margin-top: 20px;
}

.color-item {
    height: 50px;
    width: 50px;
    margin-left: 50px;
    padding-left: 10px;
}

.cart {
    justify-content: center;
    margin-top: 30px;
}

.cart-text {
    font-size: 35px;
    text-align: center;
    width: 600px;
    height: 100px;
    background-color: #6495ed;
    color: white;
}

.add-cart-text {
    font-size: 35px;
    text-align: center;
    width: 600px;
    height: 100px;
    background-color: #ffd700;
    color: white;
}

}

FA_JS.rar 8.64M 17次下载
1
收藏
回复
举报
1条回复
按时间正序
/
按时间倒序
Whyalone
Whyalone

一些有关技术性文章的撰写和排版建议:

1.展示效果或者操作步骤的时候使用图片+标识来展示

2.代码部分使用编辑器中的代码段功能,并设定好对应的语言,这样展示出来的代码就会像IDE中一样着色,方便阅读代码

3.技术性文章,代码的详细注释就是最好的文字表述

1
回复
2021-10-26 09:45:41
回复
    相关推荐