我必须构建一个从屏幕右侧滑动的导航栏。它必须覆盖整个屏幕。问题在于,在手机中,像chrome这样的浏览器在底部有这个工具栏,它隐藏了页面的某些部分。这是不可行的,因为我还必须在底部显示一些联系信息。
解决此问题的方法是使用 -webkit-fill-available。但是,我的导航栏和汉堡菜单行的 CSS 是:
.hamburger-row {
position: fixed;
height: 75px;
}
Run Code Online (Sandbox Code Playgroud)
对于导航菜单分区...
.nav-menu-div {
position: fixed;
height: calc(100vh - 75px);
}
Run Code Online (Sandbox Code Playgroud)
但要引入 -webkit-fill-available,我必须做类似的事情
height: calc(-webkit-fill-available - 75px);
Run Code Online (Sandbox Code Playgroud)
这在 css 中是不可能的。
有什么解决方法吗?
#include <iostream>
using namespace std;
class publication {
private:
string title;
float price;
public:
publication() {
this->title = "";
this->price = 0.0;
}
void getdata() {
cout << "Enter Title: ";
getline(cin, title);
cout << "Enter price: ";
cin >> this->price;
}
void putdata() {
cout << "Title: " << title << endl;
cout << "Price: " << price << endl;
}
};
class book : public publication {
private:
int pageCount;
public:
book() { this->pageCount = 0; }
void …Run Code Online (Sandbox Code Playgroud)