心得笔记 css3|h5 vue 学无止境

  • 页面的json文件中静态设置

    页面的json文件中静态设置 "navigationBarBackgroundColor": "#ffffff", "navigationBarTextStyle": "black", "navigationBarTitleText": "微信接口功能演示", "backgroundColor": "#eeeeee", "backgroundTextStyle": "light" js动态设置 wx.setNavigationBarTitle({ title: that.data.mername//页面标题为路由参数 })

  • 设置背景图,渐变背景颜色

    background-image: url('../../../assets/images/main_bg.png'); background-size: 130px 130px; background: linear-gradient(#e66465, #9198e5); background: linear-gradient(to bottom right, red, yellow); background: linear-gradient(-10deg,red,yellow); background: linear-gradient(to right, red,orange,yellow,green,blue,indigo,violet); //彩虹渐变 background: repeating-linear-gradient(red, yellow 10%, green 20%); //重复的线性渐变

  • 阴影设置

    box-shadow: 10px 10px 5px #888888;

  • 2d转换

    transform: rotate(30deg); transform: translate(50px,100px); transform:scale(1,1); //scale(2,3)转变宽度为原来的大小的2倍,和其原始大小3倍的高度

  • 动画

    @keyframes myfirst { from { background-color: red; } to { background-color: yellow; } } @keyframes myfirst2 { 0% {background: red; left:0px; top:0px;} 25% {background: yellow; left:200px; top:0px;} 50% {background: blue; left:200px; top:200px;} 75% {background: green; left:0px; top:200px;} 100% {background: red; left:0px; top:0px;} } .xx{ animation-name: myfirst; animation-duration: 2s; }

  • 快应用唤起deeplink

    const deeplink = "openapp.jdmobile://virtual?params={\"category\":\"jump\",\"des\":\"m\",\"url\":\"https://u.jd.com/tq9sMQk\",\"keplerID\":\"0\",\"keplerFrom\":\"1\",\"kepler_param\":{\"source\":\"kepler-open\",\"otherData\":{\"mopenbp7\":\"0\"}},\"union_open\":\"union_cps\"}"; router.push({ uri: deeplink })

  • 安卓界面设定值

    //隐藏标题栏 getActionBar().hide(); //等价于 此方法一定要在setContentView()之前声明 requestWindowFeature(Window.FEATURE_NO_TITLE); //不随屏幕旋转 setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_NOSENSOR); //应用运行时,保持屏幕常亮 getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

  • 沉浸模式

    true false 方法二:在Activity的onCreate()中为Window添加Flag setContentView(R.layout.activity_immersive); // 透明状态栏 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { getWindow().addFlags( WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); }

  • 全屏显示

    true @mipmap/bg // 全屏显示 getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);

  • adb操作指令

    1.查看设备 adb devices 2.安装软件 adb install [-r] -r表示强制安装

  • 应用唤醒

    private void awakeGoSecurity() { try{ Uri uri = Uri.parse("content://com.jb.security/AppAwakeTable"); Cursor cursor = getContentResolver().query(uri, null, null, null, null); if (cursor != null) { cursor.close(); } }catch (Exception e){ Logger.e(TAG, "awakeGoSecurity:" + e.getMessage()); } }

Copyright ©2023 粤ICP备2023113426号